Class: Pluckr::Schema::Node
- Inherits:
-
Object
- Object
- Pluckr::Schema::Node
- Defined in:
- lib/pluckr/schema/node.rb
Overview
Base class for every AST node.
output is the key the node produces on the result object.
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(output:) ⇒ Node
constructor
A new instance of Node.
-
#scalar? ⇒ Boolean
Nodes that map to exactly one selected column/expression.
Constructor Details
#initialize(output:) ⇒ Node
Returns a new instance of Node.
11 12 13 |
# File 'lib/pluckr/schema/node.rb', line 11 def initialize(output:) @output = output.to_sym end |
Instance Attribute Details
#output ⇒ Object (readonly)
Returns the value of attribute output.
9 10 11 |
# File 'lib/pluckr/schema/node.rb', line 9 def output @output end |
Instance Method Details
#scalar? ⇒ Boolean
Nodes that map to exactly one selected column/expression.
16 17 18 |
# File 'lib/pluckr/schema/node.rb', line 16 def scalar? true end |