Class: Wordlist::Operators::BinaryOperator

Inherits:
Operator
  • Object
show all
Defined in:
lib/wordlist/operators/binary_operator.rb

Overview

Binary operator base class.

Since:

  • 1.0.0

Direct Known Subclasses

Concat, Intersect, Power, Product, Subtract, Union

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Operator

#each

Constructor Details

#initialize(left, right) ⇒ BinaryOperator

Initializes the binary operator.

Parameters:

  • left (Enumerable)

    The left operand.

  • right (Enumerable)

    The right operand.

Since:

  • 1.0.0



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

#leftEnumerable (readonly)

The left operand.

Returns:

  • (Enumerable)

Since:

  • 1.0.0



16
17
18
# File 'lib/wordlist/operators/binary_operator.rb', line 16

def left
  @left
end

#rightEnumerable (readonly)

The right operand.

Returns:

  • (Enumerable)

Since:

  • 1.0.0



21
22
23
# File 'lib/wordlist/operators/binary_operator.rb', line 21

def right
  @right
end