Class: RoleProxy

Inherits:
Object show all
Defined in:
lib/salticid/role_proxy.rb

Instance Method Summary collapse

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