Class: USPS::Configuration
- Inherits:
-
Struct
- Object
- Struct
- USPS::Configuration
- Defined in:
- lib/usps/configuration.rb
Overview
Configuration options:
username: Provided by the USPS during registration
timeout: Connection timeout in milliseconds, nil to disable
testing: Should requests be done against the testing service or not
(only specific requests are supported).
Instance Attribute Summary collapse
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#testing ⇒ Object
(also: #testing?)
Returns the value of attribute testing.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 |
# File 'lib/usps/configuration.rb', line 8 def initialize self.timeout = 5 self.testing = false self.username = ENV['USPS_USER'] self.proxy = nil end |
Instance Attribute Details
#proxy ⇒ Object
Returns the value of attribute proxy
7 8 9 |
# File 'lib/usps/configuration.rb', line 7 def proxy @proxy end |
#testing ⇒ Object Also known as: testing?
Returns the value of attribute testing
7 8 9 |
# File 'lib/usps/configuration.rb', line 7 def testing @testing end |
#timeout ⇒ Object
Returns the value of attribute timeout
7 8 9 |
# File 'lib/usps/configuration.rb', line 7 def timeout @timeout end |
#username ⇒ Object
Returns the value of attribute username
7 8 9 |
# File 'lib/usps/configuration.rb', line 7 def username @username end |