Class: Cognizant::Application::DSLProxy

Inherits:
Object
  • Object
show all
Includes:
Util::DSLProxyMethodsHandler
Defined in:
lib/cognizant/application/dsl_proxy.rb

Instance Attribute Summary

Attributes included from Util::DSLProxyMethodsHandler

#attributes

Instance Method Summary collapse

Methods included from Util::DSLProxyMethodsHandler

#method_missing

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