Class: SomTimer::Timer

Inherits:
Object
  • Object
show all
Defined in:
lib/som_timer/poros/timer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject (readonly)

Returns the value of attribute id.



2
3
4
# File 'lib/som_timer/poros/timer.rb', line 2

def id
  @id
end

#rest_intervalObject (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

#soundObject (readonly)

Returns the value of attribute sound.



2
3
4
# File 'lib/som_timer/poros/timer.rb', line 2

def sound
  @sound
end

#work_intervalObject (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