Class: RoleProxy
Instance Method Summary collapse
-
#initialize(host, role) ⇒ RoleProxy
constructor
A new instance of RoleProxy.
- #method_missing(meth, *args, &block) ⇒ Object
Constructor Details
#initialize(host, role) ⇒ RoleProxy
Returns a new instance of RoleProxy.
18 19 20 21 |
# File 'lib/salticid/role_proxy.rb', line 18 def initialize(host, role) @host = host @role = role end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
23 24 25 |
# File 'lib/salticid/role_proxy.rb', line 23 def method_missing(meth, *args, &block) @role.tasks.find{|t| t.name == meth.to_s}.run(@host, *args, &block) end |