Class: Airbnb::RentInfo
- Inherits:
-
Object
- Object
- Airbnb::RentInfo
- Defined in:
- lib/Time_Traveler/rentInfo.rb
Instance Attribute Summary collapse
-
#infos ⇒ Object
readonly
Returns the value of attribute infos.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rooms, info) ⇒ RentInfo
constructor
A new instance of RentInfo.
Constructor Details
#initialize(rooms, info) ⇒ RentInfo
Returns a new instance of RentInfo.
8 9 10 11 12 13 |
# File 'lib/Time_Traveler/rentInfo.rb', line 8 def initialize(rooms,info) @infos = rooms.map { |item| rooms = room(item) } searchVal(info) end |
Instance Attribute Details
#infos ⇒ Object (readonly)
Returns the value of attribute infos.
6 7 8 |
# File 'lib/Time_Traveler/rentInfo.rb', line 6 def infos @infos end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
5 6 7 |
# File 'lib/Time_Traveler/rentInfo.rb', line 5 def location @location end |
Class Method Details
.find(location:) ⇒ Object
19 20 21 22 23 |
# File 'lib/Time_Traveler/rentInfo.rb', line 19 def self.find(location:) @search_info = {api:ENV['AIRBNB_API'],locate:location} rooms_data = AirbnbApi.rooms_info(location) new(rooms_data,@search_info) end |