Class: Bamboozled::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/bamboozled/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subdomain: nil, api_key: nil, httparty_options: {}) ⇒ Base

Returns a new instance of Base.



5
6
7
8
9
# File 'lib/bamboozled/base.rb', line 5

def initialize(subdomain: nil, api_key: nil, httparty_options: {})
  @subdomain, @api_key = subdomain
  @api_key = api_key
  @httparty_options = httparty_options
end

Instance Attribute Details

#requestObject (readonly)

Returns the value of attribute request.



3
4
5
# File 'lib/bamboozled/base.rb', line 3

def request
  @request
end

Instance Method Details

#employeeObject



11
12
13
# File 'lib/bamboozled/base.rb', line 11

def employee
  @employee ||= Bamboozled::API::Employee.new(@subdomain, @api_key, @httparty_options)
end

#metaObject



19
20
21
# File 'lib/bamboozled/base.rb', line 19

def meta
  @meta ||= Bamboozled::API::Meta.new(@subdomain, @api_key, @httparty_options)
end

#reportObject



15
16
17
# File 'lib/bamboozled/base.rb', line 15

def report
  @report ||= Bamboozled::API::Report.new(@subdomain, @api_key, @httparty_options)
end

#time_offObject



23
24
25
# File 'lib/bamboozled/base.rb', line 23

def time_off
  @time_off ||= Bamboozled::API::TimeOff.new(@subdomain, @api_key, @httparty_options)
end

#time_trackingObject



27
28
29
# File 'lib/bamboozled/base.rb', line 27

def time_tracking
  @time_tracking ||= Bamboozled::API::TimeTracking.new(@subdomain, @api_key, @httparty_options)
end