get words to compare to strings
This commit is contained in:
parent
b58bba3fc4
commit
38cb9f7d3c
@ -89,7 +89,17 @@ module Parfait
|
||||
class Method
|
||||
attr_accessor :info
|
||||
end
|
||||
|
||||
class Word
|
||||
def == other
|
||||
return false unless other.is_a?(String) or other.is_a?(Word)
|
||||
as_string = self.to_s
|
||||
unless other.is_a? String
|
||||
other = other.to_s
|
||||
end
|
||||
as_string == other
|
||||
end
|
||||
|
||||
def to_s
|
||||
string = ""
|
||||
index = 1
|
||||
|
Loading…
Reference in New Issue
Block a user