Class: ArduinoBuildNotifier::Notifier
- Inherits:
-
Object
- Object
- ArduinoBuildNotifier::Notifier
- Includes:
- Celluloid
- Defined in:
- lib/arduino_build_notifier/notifier.rb
Instance Method Summary collapse
-
#initialize(build, arduino, time = 10) ⇒ Notifier
constructor
A new instance of Notifier.
- #notify(status) ⇒ Object
- #start_notifications ⇒ Object
Constructor Details
#initialize(build, arduino, time = 10) ⇒ Notifier
Returns a new instance of Notifier.
7 8 9 10 11 |
# File 'lib/arduino_build_notifier/notifier.rb', line 7 def initialize(build, arduino, time = 10) @time = time @build = build @arduino = arduino end |
Instance Method Details
#notify(status) ⇒ Object
13 14 15 |
# File 'lib/arduino_build_notifier/notifier.rb', line 13 def notify(status) @arduino.send status end |
#start_notifications ⇒ Object
17 18 19 20 21 |
# File 'lib/arduino_build_notifier/notifier.rb', line 17 def start_notifications every @time do notify @build.request_status end end |