Class: TrackUnit::Client
- Inherits:
-
Object
- Object
- TrackUnit::Client
- Includes:
- HTTParty, Units
- Defined in:
- lib/trackunit/client.rb,
lib/trackunit/client/units.rb
Defined Under Namespace
Modules: Units
Instance Method Summary collapse
-
#initialize(access_token = nil) ⇒ Client
constructor
A new instance of Client.
Methods included from Units
Constructor Details
#initialize(access_token = nil) ⇒ Client
Returns a new instance of Client.
11 12 13 14 |
# File 'lib/trackunit/client.rb', line 11 def initialize(access_token = nil) access_token ||= ENV["TRACKUNIT_ACCESS_TOKEN"] self.class..merge!(default_params: { token: access_token }) end |