Class: Leftovers::Precompilers::ERB

Inherits:
ERB::Compiler
  • Object
show all
Defined in:
lib/leftovers/precompilers/erb.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.precompile(erb) ⇒ Object



8
9
10
11
# File 'lib/leftovers/precompilers/erb.rb', line 8

def self.precompile(erb)
  @compiler ||= new('-')
  @compiler.compile(erb).first
end

Instance Method Details

#add_insert_cmd(out, content) ⇒ Object

leftovers:keep



13
14
15
# File 'lib/leftovers/precompilers/erb.rb', line 13

def add_insert_cmd(out, content) # leftovers:keep
  out.push("\n#{content}\n")
end

#add_put_cmd(out, _content) ⇒ Object

leftovers:keep



17
18
19
# File 'lib/leftovers/precompilers/erb.rb', line 17

def add_put_cmd(out, _content) # leftovers:keep
  out.push("\n")
end