Module: Babl::Operators::Enter::DSL
- Included in:
- Template
- Defined in:
- lib/babl/operators/enter.rb
Instance Method Summary collapse
-
#_ ⇒ Object
Simple convenience alias.
-
#_? ⇒ Boolean
Simple convenience alias.
-
#enter ⇒ Object
Navigate to a property whose name is inferred based on parent object()‘s key.
-
#enter? ⇒ Boolean
Navigate to a property whose name is inferred based on parent object()‘s key + ’?‘.
Instance Method Details
#_ ⇒ Object
Simple convenience alias
37 38 39 |
# File 'lib/babl/operators/enter.rb', line 37 def _ enter end |
#_? ⇒ Boolean
Simple convenience alias
42 43 44 |
# File 'lib/babl/operators/enter.rb', line 42 def _? enter? end |
#enter ⇒ Object
Navigate to a property whose name is inferred based on parent object()‘s key
23 24 25 26 27 28 29 |
# File 'lib/babl/operators/enter.rb', line 23 def enter construct_node { |node, context| raise Errors::InvalidTemplate, 'No key to enter into' unless context.key?(:key) Nodes::Nav.new(context[:key], node) }.reset_key.reset_continue end |
#enter? ⇒ Boolean
Navigate to a property whose name is inferred based on parent object()‘s key + ’?‘
32 33 34 |
# File 'lib/babl/operators/enter.rb', line 32 def enter? construct_context(&KEY_QUESTIONIFIER).enter end |