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