Module: GreenGoose::API

Includes:
Enumerable
Included in:
ActionCollection, StatCollection
Defined in:
lib/greengoose/api.rb

Instance Method Summary collapse

Instance Method Details

#eachObject



5
6
7
8
9
# File 'lib/greengoose/api.rb', line 5

def each
  client.get(endpoint, conditions).body.each do |result|
    yield klass.new(result)
  end
end

#where(conditions) ⇒ Object



11
12
13
# File 'lib/greengoose/api.rb', line 11

def where(conditions)
  self.class.new(client, conditions.merge(self.conditions))
end