Class: Paradeiser::Break
- Defined in:
- lib/paradeiser/models/break.rb
Instance Attribute Summary
Attributes inherited from Scheduled
#finished_at, #id, #started_at
Instance Method Summary collapse
-
#initialize(length = 300.seconds) ⇒ Break
constructor
A new instance of Break.
- #length ⇒ Object
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
#length ⇒ Object
37 38 39 |
# File 'lib/paradeiser/models/break.rb', line 37 def length @length end |