Displaying 1 result from an estimated 1 matches for "make_could_be_japanese".
2007 Nov 27
0
Working with one model from another
...ally_understand(name_string)
raw_name = RawName.new(name_string)
if raw_name.is_one_word then
self.make = raw_name.contents
else
if raw_name.is_two_words then
self.make = raw_name.words.first
self.model = raw_name.words.last
end
end
if raw_name.make_could_be_japanese then
self.origin_country = "Japan"
end
return true
end
end
###################
# models/raw_name.rb #
###################
class RawName
def initialize(contents)
@contents = contents
@words = @contents.split('' '')
end
def contents
@c...