Class: Wordlist::Operators::UnaryOperator

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

Overview

Unary operator base class.

Since:

  • 1.0.0

Direct Known Subclasses

Unique

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Operator

#each

Constructor Details

#initialize(wordlist) ⇒ UnaryOperator

Initializes the unary operator.

Parameters:

  • wordlist (Enumerable)

    The wordlist.

Since:

  • 1.0.0



24
25
26
# File 'lib/wordlist/operators/unary_operator.rb', line 24

def initialize(wordlist)
  @wordlist = wordlist
end

Instance Attribute Details

#wordlistEnumerable (readonly)

The wordlist to operate on.

Returns:

  • (Enumerable)

Since:

  • 1.0.0



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

def wordlist
  @wordlist
end