Class: Boogaloo::ServiceGateway
- Inherits:
-
Object
- Object
- Boogaloo::ServiceGateway
- Defined in:
- lib/boogaloo/service_gateway.rb
Instance Method Summary collapse
-
#initialize(pool, services) ⇒ ServiceGateway
constructor
Initialize a new service gateway.
Constructor Details
#initialize(pool, services) ⇒ ServiceGateway
Initialize a new service gateway.
Parameters:
pool
-
A reference to a ThreadPool
services
-
A Hash of instance_name/instance pairs.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/boogaloo/service_gateway.rb', line 15 def initialize(pool, services) services.each do |name, instance| instance_variable_set("@"+name, instance) self.class.instance_eval do define_method(name) do Boogaloo::ServiceRequest.new(instance_variable_get("@"+name), pool) end end end end |