Skip to content
Browse files

allow passing of options

  • Loading branch information...
1 parent c77f553 commit b56c74dd43bb31cb9a322225d39b15fea81f6d03 @clarkdave clarkdave committed Mar 4, 2013
Showing with 6 additions and 3 deletions.
  1. +2 −2 lib/loyaltylion.rb
  2. +4 −1 lib/loyaltylion/client.rb
View
4 lib/loyaltylion.rb
@@ -3,8 +3,8 @@
module LoyaltyLion
class << self
- def new(id, secret)
- LoyaltyLion::Client.new(id, secret)
+ def new(id, secret, options = {})
+ LoyaltyLion::Client.new(id, secret, options)
end
end
end
View
5 lib/loyaltylion/client.rb
@@ -7,10 +7,13 @@ class Client
attr_reader :token, :secret
- def initialize(token, secret)
+ def initialize(token, secret, options = {})
@token = token
@secret = secret
@auth = { :token => token, :secret => secret }
+ if options[:base_uri]
+ Client.base_uri options[:base_uri]
+ end
end
def post(path, params)

0 comments on commit b56c74d

Please sign in to comment.
Something went wrong with that request. Please try again.