Class: Lightspeed::Configuration
- Inherits:
-
Object
- Object
- Lightspeed::Configuration
- Defined in:
- lib/lightspeed/configuration.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#rate_limit ⇒ Object
Returns the value of attribute rate_limit.
Instance Method Summary collapse
-
#initialize(rate_limit: nil) ⇒ Configuration
constructor
A new instance of Configuration.
- #server ⇒ Object
Constructor Details
#initialize(rate_limit: nil) ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 |
# File 'lib/lightspeed/configuration.rb', line 5 def initialize(rate_limit: nil) @rate_limit = rate_limit || false @environment = :production end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
3 4 5 |
# File 'lib/lightspeed/configuration.rb', line 3 def environment @environment end |
#rate_limit ⇒ Object
Returns the value of attribute rate_limit.
3 4 5 |
# File 'lib/lightspeed/configuration.rb', line 3 def rate_limit @rate_limit end |
Instance Method Details
#server ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/lightspeed/configuration.rb', line 18 def server case environment when :development "http://#{ENV['GATEWAY_SERVER'] || 'localhost:3000'}" when :production "https://api.merchantos.com/API/" end end |