Class: Fex::Client
- Inherits:
-
Object
- Object
- Fex::Client
- Defined in:
- lib/fex/client.rb
Instance Attribute Summary collapse
-
#globals ⇒ Object
readonly
Returns the value of attribute globals.
Instance Method Summary collapse
-
#initialize(globals) ⇒ Client
constructor
A new instance of Client.
- #service(name, locals = {}) ⇒ Object
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
#globals ⇒ Object (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 |