Class: Neopets::User

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

Defined Under Namespace

Classes: AccountDisabledError, ConnectionError, Error, NotFoundError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username) ⇒ User

Returns a new instance of User.



14
15
16
# File 'lib/neopets/user.rb', line 14

def initialize(username)
  @username = username
end

Instance Attribute Details

#usernameObject (readonly)

Returns the value of attribute username.



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

def username
  @username
end

Instance Method Details

#petsObject



18
19
20
21
# File 'lib/neopets/user.rb', line 18

def pets
  load_userlookup unless @pets
  @pets
end