Class: Leftovers::Precompilers::ERB
- Inherits:
-
ERB::Compiler
- Object
- ERB::Compiler
- Leftovers::Precompilers::ERB
- Defined in:
- lib/leftovers/precompilers/erb.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#add_insert_cmd(out, content) ⇒ Object
leftovers:keep.
-
#add_put_cmd(out, _content) ⇒ Object
leftovers:keep.
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 |