Class: RCracy::User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#imageObject (readonly)

Returns the value of attribute image.



5
6
7
# File 'lib/rcracy/user.rb', line 5

def image
  @image
end

#kcy_rankObject (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_awardsObject (readonly)

Returns the value of attribute total_awards.



5
6
7
# File 'lib/rcracy/user.rb', line 5

def total_awards
  @total_awards
end

#usernameObject (readonly)

Returns the value of attribute username.



5
6
7
# File 'lib/rcracy/user.rb', line 5

def username
  @username
end