Module: Conjur::Policy::Ruby::Delegation
- Included in:
- Loader
- Defined in:
- lib/conjur/policy/ruby/loader.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
173
174
175
176
177
178
179
|
# File 'lib/conjur/policy/ruby/loader.rb', line 173
def method_missing(sym, *args, &block)
if scope.respond_to?(sym)
scope.send sym, *args, &block
else
raise NoMethodError, "undefined method `#{sym}` for #{scope}:#{scope.class}"
end
end
|
Instance Method Details
#respond_to?(sym, include_all = false) ⇒ Boolean
169
170
171
|
# File 'lib/conjur/policy/ruby/loader.rb', line 169
def respond_to? sym, include_all = false
super or scope.respond_to?(sym, include_all)
end
|