# ERB::Compiler::Buffer (Class)

In: | erb.rb
Parent: | Object

## Methods

close cr new push

## Attributes

script | [R] |

## Public Class methods

new(compiler)

[Source]

    # File erb.rb, line 254
          def initialize(compiler)
            @compiler = compiler
            @line = []
            @script = ""
            @compiler.pre_cmd.each do |x|
              push(x)
            end
          end

## Public Instance methods

push(cmd)

[Source]

    # File erb.rb, line 264
          def push(cmd)
            @line << cmd
          end

cr()

[Source]

    # File erb.rb, line 268
          def cr
            @script << (@line.join('; '))
            @line = []
            @script << "\n"
          end

close()

[Source]

    # File erb.rb, line 274
          def close
            return unless @line
            @compiler.post_cmd.each do |x|
              push(x)
            end
            @script << (@line.join('; '))
            @line = nil
          end

[Validate]