module OmfRc::ResourceProxyDSL

DSL contains some helper methods to ease the process defining resource proxies

DSL methods are defined under {OmfRc::ResourceProxyDSL::ClassMethods}

Constants

DEFAULT_PROP_ACCESS

Default property access rights through FRCP

PROXY_DIR

Default directory contains proxy definition files

UTIL_DIR

Default directory contains utility definition files

Public Class Methods

included(base) click to toggle source

When this module included, methods defined under ClassMethods will be available in resource definition files

# File lib/omf_rc/resource_proxy_dsl.rb, line 32
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

call_hook(hook_name, context, *params) click to toggle source

Calling a hook within a given resource context

@param [Symbol] hook_name @param [Symbol] context in which resource this hook will be called

# File lib/omf_rc/resource_proxy_dsl.rb, line 22
def call_hook(hook_name, context, *params)
  context.send(hook_name, *params) if context.respond_to? hook_name
end
hook_defined?(hook_name, context) click to toggle source
# File lib/omf_rc/resource_proxy_dsl.rb, line 26
def hook_defined?(hook_name, context)
  context.respond_to? hook_name
end