Class: HotelsPro::Configuration
- Inherits:
-
Object
- Object
- HotelsPro::Configuration
- Defined in:
- lib/hotels_pro/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#only_stubs ⇒ Object
Returns the value of attribute only_stubs.
Instance Method Summary collapse
- #api_url ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 |
# File 'lib/hotels_pro/configuration.rb', line 5 def initialize @environment = "test" end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/hotels_pro/configuration.rb', line 3 def api_key @api_key end |
#environment ⇒ Object
Returns the value of attribute environment.
3 4 5 |
# File 'lib/hotels_pro/configuration.rb', line 3 def environment @environment end |
#logger ⇒ Object
Returns the value of attribute logger.
3 4 5 |
# File 'lib/hotels_pro/configuration.rb', line 3 def logger @logger end |
#only_stubs ⇒ Object
Returns the value of attribute only_stubs.
3 4 5 |
# File 'lib/hotels_pro/configuration.rb', line 3 def only_stubs @only_stubs end |
Instance Method Details
#api_url ⇒ Object
9 10 11 12 |
# File 'lib/hotels_pro/configuration.rb', line 9 def api_url env = ("" if environment == "live") || "_test" "http://api.hotelspro.com/4.1#{env}/hotel/b2bHotelJSON.php" end |