Class: Suitcase::NightlyRate
- Inherits:
-
Object
- Object
- Suitcase::NightlyRate
- Defined in:
- lib/suitcase/hotel/nightly_rate.rb
Instance Attribute Summary collapse
-
#base_rate ⇒ Object
Returns the value of attribute base_rate.
-
#promo ⇒ Object
Returns the value of attribute promo.
-
#rate ⇒ Object
Returns the value of attribute rate.
Instance Method Summary collapse
-
#initialize(info) ⇒ NightlyRate
constructor
Internal: Create a NightlyRate from the API response.
Constructor Details
#initialize(info) ⇒ NightlyRate
Internal: Create a NightlyRate from the API response.
info - A Hash from the API response containing nightly rate information.
8 9 10 11 12 |
# File 'lib/suitcase/hotel/nightly_rate.rb', line 8 def initialize(info) @promo = info["@promo"] @rate = info["@rate"] @base_rate = info["@baseRate"] end |
Instance Attribute Details
#base_rate ⇒ Object
Returns the value of attribute base_rate.
3 4 5 |
# File 'lib/suitcase/hotel/nightly_rate.rb', line 3 def base_rate @base_rate end |
#promo ⇒ Object
Returns the value of attribute promo.
3 4 5 |
# File 'lib/suitcase/hotel/nightly_rate.rb', line 3 def promo @promo end |
#rate ⇒ Object
Returns the value of attribute rate.
3 4 5 |
# File 'lib/suitcase/hotel/nightly_rate.rb', line 3 def rate @rate end |