Class: TimeChunk
Instance Attribute Summary collapse
-
#finish_time ⇒ Object
Returns the value of attribute finish_time.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#scheduled_duration ⇒ Object
Returns the value of attribute scheduled_duration.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#timestamping_method ⇒ Object
Returns the value of attribute timestamping_method.
Instance Method Summary collapse
-
#initialize(name: nil, scheduled_duration: nil, timestamping_method: Time.method(:now)) ⇒ TimeChunk
constructor
Public Interface.
Constructor Details
#initialize(name: nil, scheduled_duration: nil, timestamping_method: Time.method(:now)) ⇒ TimeChunk
Public Interface
14 15 16 17 18 19 |
# File 'lib/entities/time_chunk.rb', line 14 def initialize(name: nil, scheduled_duration: nil, timestamping_method: Time.method(:now)) self.id = SecureRandom.uuid self.name = name self.scheduled_duration = scheduled_duration self. = # Injectable clock end |
Instance Attribute Details
#finish_time ⇒ Object
Returns the value of attribute finish_time.
22 23 24 |
# File 'lib/entities/time_chunk.rb', line 22 def finish_time @finish_time end |
#id ⇒ Object
Returns the value of attribute id.
22 23 24 |
# File 'lib/entities/time_chunk.rb', line 22 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
22 23 24 |
# File 'lib/entities/time_chunk.rb', line 22 def name @name end |
#scheduled_duration ⇒ Object
Returns the value of attribute scheduled_duration.
22 23 24 |
# File 'lib/entities/time_chunk.rb', line 22 def scheduled_duration @scheduled_duration end |
#start_time ⇒ Object
Returns the value of attribute start_time.
22 23 24 |
# File 'lib/entities/time_chunk.rb', line 22 def start_time @start_time end |
#timestamping_method ⇒ Object
Returns the value of attribute timestamping_method.
22 23 24 |
# File 'lib/entities/time_chunk.rb', line 22 def end |