Class: Musa::Clock::Clock
- Inherits:
-
Object
- Object
- Musa::Clock::Clock
show all
- Defined in:
- lib/musa-dsl/transport/clock.rb
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Clock
Returns a new instance of Clock.
4
5
6
7
8
9
|
# File 'lib/musa-dsl/transport/clock.rb', line 4
def initialize
@run = nil
@on_start = []
@on_stop = []
@on_change_position = []
end
|
Instance Method Details
#on_change_position(&block) ⇒ Object
23
24
25
|
# File 'lib/musa-dsl/transport/clock.rb', line 23
def on_change_position(&block)
@on_change_position << block
end
|
#on_start(&block) ⇒ Object
15
16
17
|
# File 'lib/musa-dsl/transport/clock.rb', line 15
def on_start(&block)
@on_start << block
end
|
#on_stop(&block) ⇒ Object
19
20
21
|
# File 'lib/musa-dsl/transport/clock.rb', line 19
def on_stop(&block)
@on_stop << block
end
|
#run ⇒ Object
27
28
29
|
# File 'lib/musa-dsl/transport/clock.rb', line 27
def run
raise NotImplementedError
end
|
#running? ⇒ Boolean
11
12
13
|
# File 'lib/musa-dsl/transport/clock.rb', line 11
def running?
@run
end
|
#terminate ⇒ Object
31
32
33
|
# File 'lib/musa-dsl/transport/clock.rb', line 31
def terminate
raise NotImplementedError
end
|