Class: Dentaku::AST::Combinator
- Defined in:
- lib/dentaku/ast/combinators.rb
Instance Attribute Summary
Attributes inherited from Operation
Instance Method Summary collapse
-
#initialize ⇒ Combinator
constructor
A new instance of Combinator.
- #type ⇒ Object
Methods inherited from Operation
#dependencies, right_associative?
Methods inherited from Node
arity, #dependencies, precedence
Constructor Details
#initialize ⇒ Combinator
Returns a new instance of Combinator.
6 7 8 9 10 11 |
# File 'lib/dentaku/ast/combinators.rb', line 6 def initialize(*) super unless valid_node?(left) && valid_node?(right) fail ParseError, "#{ self.class } requires logical operands" end end |
Instance Method Details
#type ⇒ Object
13 14 15 |
# File 'lib/dentaku/ast/combinators.rb', line 13 def type :logical end |