Method: PostageApp.configure

Defined in:
lib/postageapp.rb

.configure(reset = false) {|self.configuration| ... } ⇒ Object

Call this method to modify your configuration Example:

PostageApp.configure do |config|
  config.api_key             = '1234567890abcdef'
  config.recipient_override  = '[email protected]' if Rails.env.staging?
end

If you do not want/need to initialize the gem in this way, you can use the environment variable POSTAGEAPP_API_KEY to set up your key.

Yields:



23
24
25
26
27
28
29
# File 'lib/postageapp.rb', line 23

def self.configure(reset = false)
  if (reset)
    self.configuration_reset!
  end

  yield(self.configuration)
end