Class: HipTail::Rooms
- Inherits:
-
Object
- Object
- HipTail::Rooms
- Defined in:
- lib/hiptail/atom.rb
Instance Attribute Summary collapse
- #max_results ⇒ Object readonly
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#rooms ⇒ Array
readonly
Array of HipTail::Room.
- #start_index ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(params) ⇒ Rooms
constructor
A new instance of Rooms.
Constructor Details
#initialize(params) ⇒ Rooms
Returns a new instance of Rooms.
257 258 259 |
# File 'lib/hiptail/atom.rb', line 257 def initialize(params) @raw = params.dup end |
Instance Attribute Details
#max_results ⇒ Object (readonly)
274 275 276 |
# File 'lib/hiptail/atom.rb', line 274 def max_results @raw['maxResults'] end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
255 256 257 |
# File 'lib/hiptail/atom.rb', line 255 def raw @raw end |
#rooms ⇒ Array (readonly)
Returns Array of HipTail::Room.
263 264 265 266 |
# File 'lib/hiptail/atom.rb', line 263 def rooms @rooms ||= @raw['items'].map { |item| Room.new(item) } @rooms end |
#start_index ⇒ Object (readonly)
269 270 271 |
# File 'lib/hiptail/atom.rb', line 269 def start_index @raw['startIndex'] end |