ERB::Compiler::Buffer (Class)

In: libraries/erb.rb
Parent: Object

Methods

close   cr   new   push  

Attributes

script  [R] 

Public Class methods

[Source]

     # File libraries/erb.rb, line 254
254:       def initialize(compiler)
255:         @compiler = compiler
256:         @line = []
257:         @script = ''
258:         @compiler.pre_cmd.each do |x|
259:           push(x)
260:         end
261:       end

Public Instance methods

[Source]

     # File libraries/erb.rb, line 274
274:       def close
275:         return unless @line
276:         @compiler.post_cmd.each do |x|
277:           push(x)
278:         end
279:         @script << (@line.join('; '))
280:         @line = nil
281:       end

[Source]

     # File libraries/erb.rb, line 268
268:       def cr
269:         @script << (@line.join('; '))
270:         @line = []
271:         @script << "\n"
272:       end

[Source]

     # File libraries/erb.rb, line 264
264:       def push(cmd)
265:         @line << cmd
266:       end

[Validate]