Class: ScopedSearch::QueryLanguage::AST::LeafNode
- Inherits:
-
Node
- Object
- Node
- 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)
-
- (Object) value
readonly
Returns the value of attribute value.
Instance Method Summary (collapse)
-
- (Boolean) eql?(node)
:nodoc.
-
- (LeafNode) initialize(value)
constructor
:nodoc.
-
- (Object) to_a
Return an array representation for the node.
Methods inherited from Node
#compatible_with, #inspect, #simplify
Constructor Details
- (LeafNode) initialize(value)
:nodoc
44 45 46 |
# File 'lib/scoped_search/query_language/ast.rb', line 44 def initialize(value) # :nodoc @value = value end |
Instance Attribute Details
- (Object) value (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
- (Boolean) eql?(node)
: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 |
- (Object) to_a
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 |