Class: Ocular::Inputs::Cron::Input
- Defined in:
- lib/ocular/inputs/cron_input.rb
Defined Under Namespace
Classes: DSLProxy
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
-
#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.
30 31 32 33 34 35 |
# File 'lib/ocular/inputs/cron_input.rb', line 30 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.
27 28 29 |
# File 'lib/ocular/inputs/cron_input.rb', line 27 def routes @routes end |
#scheduler ⇒ Object (readonly)
Returns the value of attribute scheduler.
28 29 30 |
# File 'lib/ocular/inputs/cron_input.rb', line 28 def scheduler @scheduler end |
Instance Method Details
#start ⇒ Object
37 38 39 |
# File 'lib/ocular/inputs/cron_input.rb', line 37 def start() end |
#stop ⇒ Object
41 42 43 |
# File 'lib/ocular/inputs/cron_input.rb', line 41 def stop() @scheduler.shutdown end |