Class: FlavourSaver::BlockExpressionNodeWithElse
- Inherits:
-
BlockExpressionNode
- Object
- RLTK::ASTNode
- Node
- TemplateItemNode
- ExpressionNode
- BlockExpressionNode
- FlavourSaver::BlockExpressionNodeWithElse
- Defined in:
- lib/flavour_saver/nodes.rb
Instance Method Summary collapse
Methods inherited from BlockExpressionNode
Instance Method Details
#inspect ⇒ Object
142 143 144 145 146 147 148 |
# File 'lib/flavour_saver/nodes.rb', line 142 def inspect r = "{{##{method.map(&:to_s).join ''}}}\n" r << contents.inspect.split("\n").join("\n ") r << "\n {{else}}\n" r << alternate.inspect.split("\n").join("\n ") r end |
#to_s ⇒ Object
138 139 140 |
# File 'lib/flavour_saver/nodes.rb', line 138 def to_s "{{##{method.map(&:to_s).join ''}}}#{contents.to_s}{{else}}#{alternate.to_s}{{/#{closer.name}}}" end |