Class: Ocular::Inputs::Trigger::Input
- Defined in:
- lib/ocular/inputs/trigger_input.rb
Instance Attribute Summary collapse
-
#routes ⇒ Object
readonly
Returns the value of attribute routes.
-
#scheduler ⇒ Object
readonly
Returns the value of attribute scheduler.
Instance Method Summary collapse
- #add_evaluator(evaluator, &block) ⇒ Object
-
#initialize(settings_factory) ⇒ Input
constructor
A new instance of Input.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(settings_factory) ⇒ Input
Returns a new instance of Input.
36 37 38 39 |
# File 'lib/ocular/inputs/trigger_input.rb', line 36 def initialize(settings_factory) settings = settings_factory[:http] @scheduler = ::Rufus::Scheduler.new end |
Instance Attribute Details
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
33 34 35 |
# File 'lib/ocular/inputs/trigger_input.rb', line 33 def routes @routes end |
#scheduler ⇒ Object (readonly)
Returns the value of attribute scheduler.
34 35 36 |
# File 'lib/ocular/inputs/trigger_input.rb', line 34 def scheduler @scheduler end |
Instance Method Details
#add_evaluator(evaluator, &block) ⇒ Object
45 46 47 |
# File 'lib/ocular/inputs/trigger_input.rb', line 45 def add_evaluator(evaluator, &block) end |
#start ⇒ Object
41 42 43 |
# File 'lib/ocular/inputs/trigger_input.rb', line 41 def start() end |
#stop ⇒ Object
49 50 51 |
# File 'lib/ocular/inputs/trigger_input.rb', line 49 def stop() @scheduler.shutdown end |