Class: Tuiter::UserBasic

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

Direct Known Subclasses

User, UserExtended

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = nil) ⇒ UserBasic

Returns a new instance of UserBasic.



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/tuiter/data/user.rb', line 14

def initialize(data = nil)
  unless data.nil?
    @id = data["id"]
    @name = data["name"]
    @screen_name = data["screen_name"]
    @location = data["location"]
    @description = data["description"]
    @profile_image_url = data["profile_image_url"]
    @url = data["url"]
    @protected = data["protected"]
    @followers_count = data["followers_count"]
  end
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



8
9
10
# File 'lib/tuiter/data/user.rb', line 8

def description
  @description
end

#followers_countObject

Returns the value of attribute followers_count.



12
13
14
# File 'lib/tuiter/data/user.rb', line 12

def followers_count
  @followers_count
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/tuiter/data/user.rb', line 4

def id
  @id
end

#locationObject

Returns the value of attribute location.



7
8
9
# File 'lib/tuiter/data/user.rb', line 7

def location
  @location
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#profile_image_urlObject

Returns the value of attribute profile_image_url.



9
10
11
# File 'lib/tuiter/data/user.rb', line 9

def profile_image_url
  @profile_image_url
end

#protectedObject

Returns the value of attribute protected.



11
12
13
# File 'lib/tuiter/data/user.rb', line 11

def protected
  @protected
end

#screen_nameObject

Returns the value of attribute screen_name.



6
7
8
# File 'lib/tuiter/data/user.rb', line 6

def screen_name
  @screen_name
end

#urlObject

Returns the value of attribute url.



10
11
12
# File 'lib/tuiter/data/user.rb', line 10

def url
  @url
end