Module: Synapse::Configuration::Dependent::ClassMethods

Defined in:
lib/synapse/configuration/dependent.rb

Instance Method Summary collapse

Instance Method Details

#depends_on(service, *args) ⇒ undefined

Parameters:

  • service (Symbol)
  • args (Object...)

Returns:

  • (undefined)


20
21
22
23
24
25
26
27
# File 'lib/synapse/configuration/dependent.rb', line 20

def depends_on(service, *args)
  options = args.extract_options!

  attribute = options[:as] || service
  attr_accessor attribute

  self.dependencies[service] = attribute
end