Class: Twingly::Analytics::Client
- Inherits:
-
Object
- Object
- Twingly::Analytics::Client
- Defined in:
- lib/twingly-analytics/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(api_key = nil) ⇒ Client
constructor
A new instance of Client.
- #query ⇒ Object
Constructor Details
#initialize(api_key = nil) ⇒ Client
Returns a new instance of Client.
6 7 8 |
# File 'lib/twingly-analytics/client.rb', line 6 def initialize(api_key = nil) @api_key = api_key || env_api_key || fail("Missing API key") end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
4 5 6 |
# File 'lib/twingly-analytics/client.rb', line 4 def api_key @api_key end |