get words to compare to strings
This commit is contained in:
parent
b58bba3fc4
commit
38cb9f7d3c
@ -89,7 +89,17 @@ module Parfait
|
|||||||
class Method
|
class Method
|
||||||
attr_accessor :info
|
attr_accessor :info
|
||||||
end
|
end
|
||||||
|
|
||||||
class Word
|
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
|
def to_s
|
||||||
string = ""
|
string = ""
|
||||||
index = 1
|
index = 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user