Class: Walrus::Grammar::BlockDirective

Inherits:
DefDirective
  • Object
show all
Defined in:
lib/walrus/grammar/block_directive.rb

Instance Method Summary collapse

Instance Method Details

#compile(options = {}) ⇒ Object

Returns a string containing the compiled (Ruby) version of receiver.



29
30
31
32
33
34
# File 'lib/walrus/grammar/block_directive.rb', line 29

def compile options = {}
  inner, outer = super
  inner = '' if inner.nil?
  inner << "lookup_and_accumulate_placeholder(#{@identifier.to_s.to_sym.inspect})\n"
  [inner, outer]
end