Class: Servitor::ServiceConfiguration

Inherits:
Object
  • Object
show all
Includes:
HasVariables
Defined in:
lib/service/service_definition/service_configuration.rb

Instance Method Summary collapse

Methods included from HasVariables

#var, #variables

Instance Method Details

#resource(name, options = nil, &block) ⇒ Object



7
8
9
10
11
# File 'lib/service/service_definition/service_configuration.rb', line 7

def resource(name, options=nil, &block)
  resource_configuration = ResourceConfiguration.new(name, options)
  resource_configuration.instance_exec(&block) if block_given?
  resources << resource_configuration
end

#resourcesObject



13
14
15
# File 'lib/service/service_definition/service_configuration.rb', line 13

def resources
  @resources ||= []
end