Class: Paradeiser::Break

Inherits:
Scheduled show all
Defined in:
lib/paradeiser/models/break.rb

Instance Attribute Summary

Attributes inherited from Scheduled

#finished_at, #id, #started_at

Instance Method Summary collapse

Methods inherited from Scheduled

#as_json, #duration, #name, #new?, #remaining

Constructor Details

#initialize(length = 300.seconds) ⇒ Break

Returns a new instance of Break.



31
32
33
34
35
# File 'lib/paradeiser/models/break.rb', line 31

def initialize(length = 300.seconds)
  super() # required for state_machine
  @length = length
  start!
end

Instance Method Details

#lengthObject



37
38
39
# File 'lib/paradeiser/models/break.rb', line 37

def length
  @length
end