Class: Milkman::Client
- Inherits:
-
Object
- Object
- Milkman::Client
- Includes:
- Utility
- Defined in:
- lib/milkman/client.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#shared_secret ⇒ Object
Returns the value of attribute shared_secret.
Instance Method Summary collapse
- #get(method, request_options = {}) ⇒ Object
-
#initialize(attributes) ⇒ Client
constructor
A new instance of Client.
Methods included from Utility
#default_options, #encode, #format, #request_url, #sign
Constructor Details
#initialize(attributes) ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 13 14 15 |
# File 'lib/milkman/client.rb', line 8 def initialize(attributes) @shared_secret = attributes.delete(:shared_secret) @options = attributes.merge if ! raise NoMilkError, "The API key and shared secret are required." end end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/milkman/client.rb', line 6 def @options end |
#shared_secret ⇒ Object
Returns the value of attribute shared_secret.
6 7 8 |
# File 'lib/milkman/client.rb', line 6 def shared_secret @shared_secret end |