Class: PSN::User

Inherits:
Object
  • Object
show all
Defined in:
lib/psn/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ User

Returns a new instance of User.



4
5
6
# File 'lib/psn/user.rb', line 4

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/psn/user.rb', line 3

def id
  @id
end

Instance Method Details

#avatarObject



12
13
14
# File 'lib/psn/user.rb', line 12

def avatar
  @avatar ||= profile_info.search('Avatar').text
end

#gamesObject



8
9
10
# File 'lib/psn/user.rb', line 8

def games
  @games ||= GamesList.new(self).games
end