Class: Rb::Lomo::User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_object) ⇒ User

Returns a new instance of User.



11
12
13
14
15
# File 'lib/rb-lomo/user.rb', line 11

def initialize json_object
  @username = json_object['username']
  @url      = json_object['url']
  @avatar   = Avatar.new json_object['avatar']
end

Instance Attribute Details

#avatarObject (readonly)

Returns the value of attribute avatar.



9
10
11
# File 'lib/rb-lomo/user.rb', line 9

def avatar
  @avatar
end

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'lib/rb-lomo/user.rb', line 7

def url
  @url
end

#usernameObject (readonly)

Returns the value of attribute username.



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

def username
  @username
end