Class: TimeCop::ReportBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/time_cop/report_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:, user:, start_date:, end_date:) ⇒ ReportBuilder

Returns a new instance of ReportBuilder.



5
6
7
8
9
10
# File 'lib/time_cop/report_builder.rb', line 5

def initialize(client:, user:, start_date:, end_date:)
  @client = client
  @user = user
  @start_date = start_date
  @end_date = end_date
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/time_cop/report_builder.rb', line 3

def client
  @client
end

#end_dateObject (readonly)

Returns the value of attribute end_date.



3
4
5
# File 'lib/time_cop/report_builder.rb', line 3

def end_date
  @end_date
end

#start_dateObject (readonly)

Returns the value of attribute start_date.



3
4
5
# File 'lib/time_cop/report_builder.rb', line 3

def start_date
  @start_date
end

#userObject (readonly)

Returns the value of attribute user.



3
4
5
# File 'lib/time_cop/report_builder.rb', line 3

def user
  @user
end

Instance Method Details

#generateObject



12
13
14
# File 'lib/time_cop/report_builder.rb', line 12

def generate
  reports.time_by_user(user, start_date, end_date)
end