Class: Ean::Request
- Inherits:
-
Object
- Object
- Ean::Request
- Defined in:
- lib/ean/request.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
Instance Method Summary collapse
-
#initialize(method = "") ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(method = "") ⇒ Request
Returns a new instance of Request.
7 8 9 10 11 |
# File 'lib/ean/request.rb', line 7 def initialize(method="") @api = Ean::API.instance @base_url = "http://api.ean.com/ean-services/rs/hotel/v#{api.version}/#{method}?cid=#{api.cid}&apiKey=#{api.key}\ &locale=#{api.locale}¤cyCode=#{api.currency_code}&minorRev=#{api.minor_rev}" end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
5 6 7 |
# File 'lib/ean/request.rb', line 5 def api @api end |
#base_url ⇒ Object
Returns the value of attribute base_url.
5 6 7 |
# File 'lib/ean/request.rb', line 5 def base_url @base_url end |