Module: ZombieFans::Actions::Query::ClassMethods

Included in:
Robot
Defined in:
lib/zombie_fans/actions/query.rb

Instance Method Summary collapse

Instance Method Details

#find(query, key = 'login') ⇒ Object



4
5
6
7
# File 'lib/zombie_fans/actions/query.rb', line 4

def find query, key = 'login'
  yaml = Persist.load
  new yaml.find { |record| record[key] == query }
end