Class: LevensteinWithPath::Swap
- Defined in:
- lib/levenstein_with_path.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#token1 ⇒ Object
readonly
Returns the value of attribute token1.
-
#token2 ⇒ Object
readonly
Returns the value of attribute token2.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(token1, token2) ⇒ Swap
constructor
A new instance of Swap.
Constructor Details
#initialize(token1, token2) ⇒ Swap
Returns a new instance of Swap.
129 130 131 132 |
# File 'lib/levenstein_with_path.rb', line 129 def initialize(token1, token2) @token1 = token1 @token2 = token2 end |
Instance Attribute Details
#token1 ⇒ Object (readonly)
Returns the value of attribute token1.
128 129 130 |
# File 'lib/levenstein_with_path.rb', line 128 def token1 @token1 end |
#token2 ⇒ Object (readonly)
Returns the value of attribute token2.
128 129 130 |
# File 'lib/levenstein_with_path.rb', line 128 def token2 @token2 end |
Instance Method Details
#==(other) ⇒ Object
133 134 135 |
# File 'lib/levenstein_with_path.rb', line 133 def ==(other) other.is_a?(Swap) and other.token1 == token1 and other.token2 == token2 end |