class DeclarativePolicy::DelegateDsl
Used when the name of a delegate is mentioned in the rule DSL.
Public Class Methods
new(rule_dsl, delegate_name)
click to toggle source
# File lib/declarative_policy/delegate_dsl.rb, line 7 def initialize(rule_dsl, delegate_name) @rule_dsl = rule_dsl @delegate_name = delegate_name end
Public Instance Methods
method_missing(msg, *args)
click to toggle source
Calls superclass method
# File lib/declarative_policy/delegate_dsl.rb, line 12 def method_missing(msg, *args) return super unless args.empty? && !block_given? @rule_dsl.delegate(@delegate_name, msg) end
respond_to_missing?(msg, include_all)
click to toggle source
# File lib/declarative_policy/delegate_dsl.rb, line 18 def respond_to_missing?(msg, include_all) true end