Class: SomTimer::Timer
- Inherits:
-
Object
- Object
- SomTimer::Timer
- Defined in:
- lib/som_timer/poros/timer.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#rest_interval ⇒ Object
readonly
Returns the value of attribute rest_interval.
-
#sound ⇒ Object
readonly
Returns the value of attribute sound.
-
#work_interval ⇒ Object
readonly
Returns the value of attribute work_interval.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Timer
constructor
A new instance of Timer.
Constructor Details
#initialize(attributes) ⇒ Timer
Returns a new instance of Timer.
7 8 9 10 11 12 |
# File 'lib/som_timer/poros/timer.rb', line 7 def initialize(attributes) @id = attributes[:id] @work_interval = attributes[:work_interval] @rest_interval = attributes[:rest_interval] @sound = attributes[:sound] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'lib/som_timer/poros/timer.rb', line 2 def id @id end |
#rest_interval ⇒ Object (readonly)
Returns the value of attribute rest_interval.
2 3 4 |
# File 'lib/som_timer/poros/timer.rb', line 2 def rest_interval @rest_interval end |
#sound ⇒ Object (readonly)
Returns the value of attribute sound.
2 3 4 |
# File 'lib/som_timer/poros/timer.rb', line 2 def sound @sound end |
#work_interval ⇒ Object (readonly)
Returns the value of attribute work_interval.
2 3 4 |
# File 'lib/som_timer/poros/timer.rb', line 2 def work_interval @work_interval end |