Class: HipTail::Rooms

Inherits:
Object
  • Object
show all
Defined in:
lib/hiptail/atom.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_resultsObject (readonly)



274
275
276
# File 'lib/hiptail/atom.rb', line 274

def max_results
  @raw['maxResults']
end

#rawObject (readonly)

Returns the value of attribute raw.



255
256
257
# File 'lib/hiptail/atom.rb', line 255

def raw
  @raw
end

#roomsArray (readonly)

Returns Array of HipTail::Room.

Returns:

  • (Array)

    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_indexObject (readonly)



269
270
271
# File 'lib/hiptail/atom.rb', line 269

def start_index
  @raw['startIndex']
end