Class: ExistClient::TimeTracking::Entry

Inherits:
Object
  • Object
show all
Includes:
LogicalDate
Defined in:
lib/exist_client/time_tracking/entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Entry

Returns a new instance of Entry.

[View source]

8
9
10
11
12
13
# File 'lib/exist_client/time_tracking/entry.rb', line 8

def initialize(data)
  @start_time = data.fetch(:start_time)
  @end_time = data.fetch(:end_time)
  @productivity = data.fetch(:productivity)
  @seconds = end_time - start_time
end

Instance Attribute Details

#end_timeObject (readonly)

Returns the value of attribute end_time.


6
7
8
# File 'lib/exist_client/time_tracking/entry.rb', line 6

def end_time
  @end_time
end

#productivityObject (readonly)

Returns the value of attribute productivity.


6
7
8
# File 'lib/exist_client/time_tracking/entry.rb', line 6

def productivity
  @productivity
end

#secondsObject (readonly)

Returns the value of attribute seconds.


6
7
8
# File 'lib/exist_client/time_tracking/entry.rb', line 6

def seconds
  @seconds
end

#start_timeObject (readonly)

Returns the value of attribute start_time.


6
7
8
# File 'lib/exist_client/time_tracking/entry.rb', line 6

def start_time
  @start_time
end

Instance Method Details

#logical_dateObject

[View source]

15
16
17
# File 'lib/exist_client/time_tracking/entry.rb', line 15

def logical_date
  super(start_time)
end