Class: Wordlist::Operators::BinaryOperator
- Defined in:
- lib/wordlist/operators/binary_operator.rb
Overview
Binary operator base class.
Instance Attribute Summary collapse
-
#left ⇒ Enumerable
readonly
The left operand.
-
#right ⇒ Enumerable
readonly
The right operand.
Instance Method Summary collapse
-
#initialize(left, right) ⇒ BinaryOperator
constructor
Initializes the binary operator.
Methods inherited from Operator
Constructor Details
#initialize(left, right) ⇒ BinaryOperator
Initializes the binary operator.
32 33 34 35 |
# File 'lib/wordlist/operators/binary_operator.rb', line 32 def initialize(left,right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Enumerable (readonly)
The left operand.
16 17 18 |
# File 'lib/wordlist/operators/binary_operator.rb', line 16 def left @left end |
#right ⇒ Enumerable (readonly)
The right operand.
21 22 23 |
# File 'lib/wordlist/operators/binary_operator.rb', line 21 def right @right end |