Class: Airbnb::RoomsInfo
- Inherits:
-
Object
- Object
- Airbnb::RoomsInfo
- Defined in:
- lib/movlog/room.rb
Overview
Room info
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(location) ⇒ RoomsInfo
constructor
A new instance of RoomsInfo.
- #rooms ⇒ Object
Constructor Details
#initialize(location) ⇒ RoomsInfo
Returns a new instance of RoomsInfo.
9 10 11 |
# File 'lib/movlog/room.rb', line 9 def initialize(location) @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
7 8 9 |
# File 'lib/movlog/room.rb', line 7 def location @location end |
Class Method Details
.find(location) ⇒ Object
21 22 23 |
# File 'lib/movlog/room.rb', line 21 def self.find(location) new(location) end |
Instance Method Details
#rooms ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/movlog/room.rb', line 13 def rooms return @rooms if @rooms rooms_data = AirbnbApi.rooms_result(@location) @rooms = rooms_data.map do |item| room(item) end end |