Class: ScopedSearch::QueryLanguage::AST::LeafNode
- Defined in:
- lib/scoped_search/query_language/ast.rb
Overview
AST lead node. This node represents leafs in the AST and can represent either a search phrase or a search field name.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#eql?(node) ⇒ Boolean
:nodoc.
-
#initialize(value) ⇒ LeafNode
constructor
:nodoc.
-
#to_a ⇒ Object
Return an array representation for the node.
Methods inherited from Node
#compatible_with, #inspect, #simplify
Constructor Details
#initialize(value) ⇒ LeafNode
:nodoc
44 45 46 |
# File 'lib/scoped_search/query_language/ast.rb', line 44 def initialize(value) # :nodoc @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
42 43 44 |
# File 'lib/scoped_search/query_language/ast.rb', line 42 def value @value end |
Instance Method Details
#eql?(node) ⇒ Boolean
:nodoc
53 54 55 |
# File 'lib/scoped_search/query_language/ast.rb', line 53 def eql?(node) # :nodoc node.kind_of?(LeafNode) && node.value == value end |
#to_a ⇒ Object
Return an array representation for the node
49 50 51 |
# File 'lib/scoped_search/query_language/ast.rb', line 49 def to_a value end |