Class: Neopets::User
- Inherits:
-
Object
- Object
- Neopets::User
- Defined in:
- lib/neopets/user.rb
Defined Under Namespace
Classes: AccountDisabledError, ConnectionError, Error, NotFoundError
Instance Attribute Summary collapse
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username) ⇒ User
constructor
A new instance of User.
- #pets ⇒ Object
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
#username ⇒ Object (readonly)
Returns the value of attribute username.
12 13 14 |
# File 'lib/neopets/user.rb', line 12 def username @username end |
Instance Method Details
#pets ⇒ Object
18 19 20 21 |
# File 'lib/neopets/user.rb', line 18 def pets load_userlookup unless @pets @pets end |