lib/gamefic/keywords.rb in gamefic-0.0.2 vs lib/gamefic/keywords.rb in gamefic-0.0.3

- old
+ new

@@ -5,9 +5,12 @@ class Keywords < Array def initialize(statement = '') if statement.kind_of?(Keywords) self.concat statement else + if statement.kind_of?(Array) + statement = statement.join(' ') + end self.concat statement.to_s.gsub(/[^a-z0-9]/i, ' ').strip.downcase.split(' ') end self.delete_if { |w| w.length < 2 or w == 'an' or w == 'the' }