Class: Truepill::Configuration
- Inherits:
-
Object
- Object
- Truepill::Configuration
- Defined in:
- lib/truepill/configuration.rb
Overview
Truepill Configuration class
Instance Attribute Summary collapse
-
#api_key ⇒ Object
[String] Client API Key (obtain from the Truepill portal).
-
#environment ⇒ Object
[String] Environment to use - 'production' or 'sandbox'.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #production? ⇒ Boolean
- #sandbox? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 |
# File 'lib/truepill/configuration.rb', line 13 def initialize # default to sandbox environment @environment = :sandbox end |
Instance Attribute Details
#api_key ⇒ Object
[String] Client API Key (obtain from the Truepill portal)
11 12 13 |
# File 'lib/truepill/configuration.rb', line 11 def api_key @api_key end |
#environment ⇒ Object
[String] Environment to use - 'production' or 'sandbox'
9 10 11 |
# File 'lib/truepill/configuration.rb', line 9 def environment @environment end |
Instance Method Details
#production? ⇒ Boolean
18 19 20 |
# File 'lib/truepill/configuration.rb', line 18 def production? environment == :production end |
#sandbox? ⇒ Boolean
22 23 24 |
# File 'lib/truepill/configuration.rb', line 22 def sandbox? environment == :sandbox end |