Class: RCracy::User
- Inherits:
-
Object
- Object
- RCracy::User
- Defined in:
- lib/rcracy/user.rb
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#kcy_rank ⇒ Object
readonly
Returns the value of attribute kcy_rank.
-
#total_awards ⇒ Object
readonly
Returns the value of attribute total_awards.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(attrs) ⇒ User
Returns a new instance of User.
7 8 9 10 11 12 13 14 |
# File 'lib/rcracy/user.rb', line 7 def initialize(attrs) @username = attrs['username'] @kcy_rank = attrs['kcyrank'] @image = attrs['img'] @total_awards = attrs['totalawards'] end |
Instance Attribute Details
#image ⇒ Object (readonly)
Returns the value of attribute image.
5 6 7 |
# File 'lib/rcracy/user.rb', line 5 def image @image end |
#kcy_rank ⇒ Object (readonly)
Returns the value of attribute kcy_rank.
5 6 7 |
# File 'lib/rcracy/user.rb', line 5 def kcy_rank @kcy_rank end |
#total_awards ⇒ Object (readonly)
Returns the value of attribute total_awards.
5 6 7 |
# File 'lib/rcracy/user.rb', line 5 def total_awards @total_awards end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
5 6 7 |
# File 'lib/rcracy/user.rb', line 5 def username @username end |