Class: Fex::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/fex/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(globals) ⇒ Client

Returns a new instance of Client.



9
10
11
# File 'lib/fex/client.rb', line 9

def initialize(globals)
  @globals = globals
end

Instance Attribute Details

#globalsObject (readonly)

Returns the value of attribute globals.



7
8
9
# File 'lib/fex/client.rb', line 7

def globals
  @globals
end

Instance Method Details

#service(name, locals = {}) ⇒ Object



13
14
15
16
17
# File 'lib/fex/client.rb', line 13

def service(name, locals = {})
  config = service_configuration[name]
  opts = globals.deep_merge(config).deep_merge(locals)
  ServiceFactory.new(name, opts).service
end