Class: ConceptQL::Tree
- Inherits:
-
Object
- Object
- ConceptQL::Tree
- Defined in:
- lib/conceptql/tree.rb
Instance Attribute Summary collapse
-
#behavior ⇒ Object
readonly
Returns the value of attribute behavior.
-
#defined ⇒ Object
readonly
Returns the value of attribute defined.
-
#nodifier ⇒ Object
readonly
Returns the value of attribute nodifier.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Tree
constructor
A new instance of Tree.
- #root(*queries) ⇒ Object
Constructor Details
Instance Attribute Details
#behavior ⇒ Object (readonly)
Returns the value of attribute behavior.
6 7 8 |
# File 'lib/conceptql/tree.rb', line 6 def behavior @behavior end |
#defined ⇒ Object (readonly)
Returns the value of attribute defined.
6 7 8 |
# File 'lib/conceptql/tree.rb', line 6 def defined @defined end |
#nodifier ⇒ Object (readonly)
Returns the value of attribute nodifier.
6 7 8 |
# File 'lib/conceptql/tree.rb', line 6 def nodifier @nodifier end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
6 7 8 |
# File 'lib/conceptql/tree.rb', line 6 def opts @opts end |
Instance Method Details
#root(*queries) ⇒ Object
14 15 16 |
# File 'lib/conceptql/tree.rb', line 14 def root(*queries) @root ||= traverse(queries.flatten.map(&:statement).flatten.map(&:deep_symbolize_keys)) end |