Class: FlavourSaver::BlockExpressionNode

Inherits:
ExpressionNode show all
Defined in:
lib/flavour_saver/nodes.rb

Direct Known Subclasses

BlockExpressionNodeWithElse

Instance Method Summary collapse

Instance Method Details

#inspectObject



127
128
129
130
131
132
# File 'lib/flavour_saver/nodes.rb', line 127

def inspect
  r = "{{##{method.map(&:to_s).join ''}}}\n"
  r << "  "
  r << contents.inspect.split("\n").join("\n  ")
  r
end

#nameObject



119
120
121
# File 'lib/flavour_saver/nodes.rb', line 119

def name
  method.first.name
end

#to_sObject



123
124
125
# File 'lib/flavour_saver/nodes.rb', line 123

def to_s
  "{{##{method.map(&:to_s).join ''}}}#{contents.to_s}{{/#{closer.name}}}"
end