Class: Ecm::TimeTracking::SumsService

Inherits:
Itsf::Services::V2::Service::Base
  • Object
show all
Defined in:
app/services/ecm/time_tracking/sums_service.rb

Defined Under Namespace

Classes: Response

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#count_by_entry_typeObject

Returns the value of attribute count_by_entry_type.



12
13
14
# File 'app/services/ecm/time_tracking/sums_service.rb', line 12

def count_by_entry_type
  @count_by_entry_type
end

#entriesObject

Returns the value of attribute entries.



12
13
14
# File 'app/services/ecm/time_tracking/sums_service.rb', line 12

def entries
  @entries
end

#overtimeObject

Returns the value of attribute overtime.



12
13
14
# File 'app/services/ecm/time_tracking/sums_service.rb', line 12

def overtime
  @overtime
end

Instance Method Details

#do_workObject



16
17
18
19
20
21
22
# File 'app/services/ecm/time_tracking/sums_service.rb', line 16

def do_work
  return response unless valid?
  calculate_sums
  response.overtime = overtime
  response.count_by_entry_type = count_by_entry_type
  response
end