Class: LevensteinWithPath::Swap

Inherits:
Edit
  • Object
show all
Defined in:
lib/levenstein_with_path.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#token1Object (readonly)

Returns the value of attribute token1.



128
129
130
# File 'lib/levenstein_with_path.rb', line 128

def token1
  @token1
end

#token2Object (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