Module: Babl::Operators::Enter::DSL
- Included in:
- Template
- Defined in:
- lib/babl/operators/enter.rb
Instance Method Summary collapse
-
#_ ⇒ Object
Simple convenience alias.
-
#enter ⇒ Object
Navigate to a named property of current element.
Instance Method Details
#_ ⇒ Object
Simple convenience alias
20 21 22 |
# File 'lib/babl/operators/enter.rb', line 20 def _ enter end |
#enter ⇒ Object
Navigate to a named property of current element. The name is inferred based on the object()
11 12 13 14 15 16 17 |
# File 'lib/babl/operators/enter.rb', line 11 def enter construct_node(key: nil, continue: nil) { |node, context| key = context[:key] raise Errors::InvalidTemplate, 'No key to enter into' unless key Nodes::Nav.new(key, node) } end |