Class: HipTail::Users

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Users

Returns a new instance of Users.



282
283
284
# File 'lib/hiptail/atom.rb', line 282

def initialize(params)
  @raw = params.dup
end

Instance Attribute Details

#max_resultsObject (readonly)



299
300
301
# File 'lib/hiptail/atom.rb', line 299

def max_results
  @raw['maxResults']
end

#rawObject (readonly)

Returns the value of attribute raw.



280
281
282
# File 'lib/hiptail/atom.rb', line 280

def raw
  @raw
end

#start_indexObject (readonly)



294
295
296
# File 'lib/hiptail/atom.rb', line 294

def start_index
  @raw['startIndex']
end

#usersArray (readonly)

Returns Array of HipTail::User.

Returns:

  • (Array)

    Array of HipTail::User.



288
289
290
291
# File 'lib/hiptail/atom.rb', line 288

def users
  @users ||= @raw['items'].map { |item| User.new(item) }
  @users
end