Class: CoderWally::User
- Inherits:
-
Object
- Object
- CoderWally::User
- Defined in:
- lib/coder_wally/user.rb
Overview
Stores user properties
Instance Attribute Summary collapse
-
#accounts ⇒ Object
readonly
Object properties.
-
#badges ⇒ Object
readonly
Object properties.
-
#details ⇒ Object
readonly
Object properties.
Instance Method Summary collapse
-
#initialize(data, badges, accounts) ⇒ User
constructor
Initialise object with a hash of values.
Constructor Details
#initialize(data, badges, accounts) ⇒ User
Initialise object with a hash of values
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/coder_wally/user.rb', line 9 def initialize(data, badges, accounts) @badges = badges @accounts = accounts @details = { name: data['name'], username: data['username'], location: data['location'], team: data['team'], endorsements: data['endorsements'] } end |
Instance Attribute Details
#accounts ⇒ Object (readonly)
Object properties
6 7 8 |
# File 'lib/coder_wally/user.rb', line 6 def accounts @accounts end |
#badges ⇒ Object (readonly)
Object properties
6 7 8 |
# File 'lib/coder_wally/user.rb', line 6 def badges @badges end |
#details ⇒ Object (readonly)
Object properties
6 7 8 |
# File 'lib/coder_wally/user.rb', line 6 def details @details end |