Module: Groupon

Defined in:
lib/groupon.rb,
lib/groupon/client.rb

Defined Under Namespace

Classes: Client, GrouponError

Constant Summary collapse

VERSION =
"0.0.1".freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject

Returns the value of attribute api_key.



35
36
37
# File 'lib/groupon.rb', line 35

def api_key
  @api_key
end

Class Method Details

.configure {|_self| ... } ⇒ Object

config/initializers/gowalla.rb (for instance)

Groupon.configure do |config|

config.api_key = 'api_key'

end

elsewhere

client = Groupon::Client.new

Yields:

  • (_self)

Yield Parameters:

  • _self (Groupon)

    the object that the method was called on



29
30
31
32
# File 'lib/groupon.rb', line 29

def self.configure
  yield self
  true
end

.deals(options = {}) ⇒ Object



16
17
18
# File 'lib/groupon.rb', line 16

def self.deals(options={})
  Groupon::Client.new.deals(options)
end

.divisionsObject



12
13
14
# File 'lib/groupon.rb', line 12

def self.divisions
  Groupon::Client.new.divisions
end