Class: Cognizant::Application::DSLProxy
- Inherits:
-
Object
- Object
- Cognizant::Application::DSLProxy
- Includes:
- Util::DSLProxyMethodsHandler
- Defined in:
- lib/cognizant/application/dsl_proxy.rb
Instance Attribute Summary
Attributes included from Util::DSLProxyMethodsHandler
Instance Method Summary collapse
-
#initialize(application, &dsl_block) ⇒ DSLProxy
constructor
A new instance of DSLProxy.
- #monitor(process_name = nil, attributes = {}, &block) ⇒ Object
- #process(process_name = nil, attributes = {}, &block) ⇒ Object
Methods included from Util::DSLProxyMethodsHandler
Constructor Details
#initialize(application, &dsl_block) ⇒ DSLProxy
Returns a new instance of DSLProxy.
8 9 10 11 12 |
# File 'lib/cognizant/application/dsl_proxy.rb', line 8 def initialize(application, &dsl_block) super @application = application instance_eval(&dsl_block) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cognizant::Util::DSLProxyMethodsHandler
Instance Method Details
#monitor(process_name = nil, attributes = {}, &block) ⇒ Object
14 15 16 |
# File 'lib/cognizant/application/dsl_proxy.rb', line 14 def monitor(process_name = nil, attributes = {}, &block) @application.monitor(process_name, attributes, &block) end |
#process(process_name = nil, attributes = {}, &block) ⇒ Object
18 19 20 |
# File 'lib/cognizant/application/dsl_proxy.rb', line 18 def process(process_name = nil, attributes = {}, &block) @application.process(process_name, attributes, &block) end |