Class: Px::Service::Client::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/px/service/client/base.rb

Defined Under Namespace

Classes: DefaultConfig

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configure {|c| ... } ⇒ Object

Configure the client

Yields:

  • (c)


16
17
18
19
20
# File 'lib/px/service/client/base.rb', line 16

def self.configure
  c = self.config.dup
  yield(c) if block_given?
  self.config = c
end

Instance Method Details

#configureObject

Make class config available to instances



23
24
25
# File 'lib/px/service/client/base.rb', line 23

def configure
  self.class.configure { |c| yield(c) }
end