Class: TrackUnit::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty, Units
Defined in:
lib/trackunit/client.rb,
lib/trackunit/client/units.rb

Defined Under Namespace

Modules: Units

Instance Method Summary collapse

Methods included from Units

#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.default_options.merge!(default_params: { token: access_token })
end