Class: TogglBillable::Formatter::Base

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

Direct Known Subclasses

Details, Summary

Constant Summary collapse

NO_CLIENT_KEY =
'NO_CLIENT'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(report, options = {}) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
# File 'lib/toggl_billable/formatter/base.rb', line 8

def initialize(report, options = {})
  @data     = report['data']
  @billable = {}
  @no_client_key = options[:default_client] || NO_CLIENT_KEY
end

Instance Attribute Details

#billableObject

Returns the value of attribute billable.



4
5
6
# File 'lib/toggl_billable/formatter/base.rb', line 4

def billable
  @billable
end

#dataObject

Returns the value of attribute data.



4
5
6
# File 'lib/toggl_billable/formatter/base.rb', line 4

def data
  @data
end