Class: Flok::ServicesCompilerConfigContext

Inherits:
Object
  • Object
show all
Defined in:
lib/flok/services_compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeServicesCompilerConfigContext

Returns a new instance of ServicesCompilerConfigContext.



37
38
39
# File 'lib/flok/services_compiler.rb', line 37

def initialize
  @service_instances = []
end

Instance Attribute Details

#service_instancesObject

Each service instance contains a :instance_name and :class



35
36
37
# File 'lib/flok/services_compiler.rb', line 35

def service_instances
  @service_instances
end

Instance Method Details

#service_instance(instance_name, name, options = {}) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/flok/services_compiler.rb', line 41

def service_instance instance_name, name, options={}
  @service_instances.push({
    :instance_name => instance_name,
    :class => name,
    :options => options
  })
end