Class: Musa::Clock::Clock

Inherits:
Object
  • Object
show all
Defined in:
lib/musa-dsl/transport/clock.rb

Instance Method Summary collapse

Constructor Details

#initializeClock

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

#runObject

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/musa-dsl/transport/clock.rb', line 27

def run
  raise NotImplementedError
end

#running?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/musa-dsl/transport/clock.rb', line 11

def running?
  @run
end

#terminateObject

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/musa-dsl/transport/clock.rb', line 31

def terminate
  raise NotImplementedError
end