Class: Ocular::Event::DefinitionProxy
- Inherits:
-
Object
- Object
- Ocular::Event::DefinitionProxy
- Includes:
- DSL::Cache, DSL::Etcd, DSL::File, DSL::Fog, DSL::Graphite, DSL::Logging, DSL::Mongo, DSL::MySQL, DSL::Psql, DSL::RabbitMQ, DSL::SSH, Inputs::Cron::DSL, Inputs::HTTP::DSL, Inputs::HTTP::ErrorDSL, Inputs::RabbitMQ::DSL, Inputs::Trigger::DSL, Mixin::FromFile
- Defined in:
- lib/ocular/event/eventfactory.rb
Instance Attribute Summary collapse
-
#dirname ⇒ Object
readonly
Returns the value of attribute dirname.
-
#do_fork ⇒ Object
readonly
Returns the value of attribute do_fork.
-
#events ⇒ Object
Returns the value of attribute events.
-
#handlers ⇒ Object
Returns the value of attribute handlers.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#script_name ⇒ Object
readonly
Returns the value of attribute script_name.
Instance Method Summary collapse
- #fork(value) ⇒ Object
-
#initialize(script_name, dirname, handlers) ⇒ DefinitionProxy
constructor
A new instance of DefinitionProxy.
- #onEvent(type, &block) ⇒ Object
Methods included from Inputs::RabbitMQ::DSL
Methods included from Inputs::Trigger::DSL
Methods included from Inputs::Cron::DSL
Methods included from Inputs::HTTP::DSL
#onDELETE, #onGET, #onOPTIONS, #onPOST
Methods included from DSL::File
Methods included from DSL::Cache
Methods included from DSL::Graphite
#graphite, #graphite_get_latests
Methods included from DSL::RabbitMQ
Methods included from DSL::Mongo
Methods included from DSL::Psql
Methods included from DSL::MySQL
Methods included from DSL::Etcd
#etcd, #locked?, #ttl_lock, #unlock
Methods included from DSL::Fog
#autoscaling, #aws, #find_server_by_id, #find_server_by_ip, #find_servers_in_autoscaling_groups, #get_servers_in_autoscaling_group
Methods included from DSL::SSH
Methods included from DSL::Logging
#debug, #error, #fatal, #info, #log_cause, #log_event, #log_timing, #warn
Methods included from Mixin::FromFile
Constructor Details
#initialize(script_name, dirname, handlers) ⇒ DefinitionProxy
Returns a new instance of DefinitionProxy.
17 18 19 20 21 22 23 24 |
# File 'lib/ocular/event/eventfactory.rb', line 17 def initialize(script_name, dirname, handlers) @script_name = script_name @dirname = dirname @events = {} @logger = ::Ocular.logger @handlers = handlers @do_fork = true end |
Instance Attribute Details
#dirname ⇒ Object (readonly)
Returns the value of attribute dirname.
14 15 16 |
# File 'lib/ocular/event/eventfactory.rb', line 14 def dirname @dirname end |
#do_fork ⇒ Object (readonly)
Returns the value of attribute do_fork.
14 15 16 |
# File 'lib/ocular/event/eventfactory.rb', line 14 def do_fork @do_fork end |
#events ⇒ Object
Returns the value of attribute events.
13 14 15 |
# File 'lib/ocular/event/eventfactory.rb', line 13 def events @events end |
#handlers ⇒ Object
Returns the value of attribute handlers.
15 16 17 |
# File 'lib/ocular/event/eventfactory.rb', line 15 def handlers @handlers end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
14 15 16 |
# File 'lib/ocular/event/eventfactory.rb', line 14 def logger @logger end |
#script_name ⇒ Object (readonly)
Returns the value of attribute script_name.
14 15 16 |
# File 'lib/ocular/event/eventfactory.rb', line 14 def script_name @script_name end |
Instance Method Details
#fork(value) ⇒ Object
45 46 47 |
# File 'lib/ocular/event/eventfactory.rb', line 45 def fork(value) @do_fork = value end |