Class: Query::Node::Part
- Inherits:
-
Query::Node
- Object
- Query::Node
- Query::Node::Part
- Defined in:
- lib/query/node/part.rb
Instance Attribute Summary collapse
-
#part ⇒ Object
Returns the value of attribute part.
Instance Method Summary collapse
- #evaluate(**args) ⇒ Object
-
#initialize(parsed) ⇒ Part
constructor
A new instance of Part.
Constructor Details
#initialize(parsed) ⇒ Part
8 9 10 11 12 13 14 |
# File 'lib/query/node/part.rb', line 8 def initialize(parsed) if parsed.key?(:key_value) self.part = KeyValue.new(parsed.delete(:key_value)) elsif parsed.key?(:text) self.part = Text.new(parsed.delete(:text)) end end |
Instance Attribute Details
#part ⇒ Object
Returns the value of attribute part.
6 7 8 |
# File 'lib/query/node/part.rb', line 6 def part @part end |
Instance Method Details
#evaluate(**args) ⇒ Object
16 17 18 |
# File 'lib/query/node/part.rb', line 16 def evaluate(**args) part&.evaluate(**args) end |