Class: Tuiter::UserBasic
- Inherits:
-
Object
- Object
- Tuiter::UserBasic
- Defined in:
- lib/tuiter/data/user.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#followers_count ⇒ Object
Returns the value of attribute followers_count.
-
#id ⇒ Object
Returns the value of attribute id.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#profile_image_url ⇒ Object
Returns the value of attribute profile_image_url.
-
#protected ⇒ Object
Returns the value of attribute protected.
-
#screen_name ⇒ Object
Returns the value of attribute screen_name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(data = nil) ⇒ UserBasic
constructor
A new instance of UserBasic.
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
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/tuiter/data/user.rb', line 8 def description @description end |
#followers_count ⇒ Object
Returns the value of attribute followers_count.
12 13 14 |
# File 'lib/tuiter/data/user.rb', line 12 def followers_count @followers_count end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/tuiter/data/user.rb', line 4 def id @id end |
#location ⇒ Object
Returns the value of attribute location.
7 8 9 |
# File 'lib/tuiter/data/user.rb', line 7 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/tuiter/data/user.rb', line 5 def name @name end |
#profile_image_url ⇒ Object
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 |
#protected ⇒ Object
Returns the value of attribute protected.
11 12 13 |
# File 'lib/tuiter/data/user.rb', line 11 def protected @protected end |
#screen_name ⇒ Object
Returns the value of attribute screen_name.
6 7 8 |
# File 'lib/tuiter/data/user.rb', line 6 def screen_name @screen_name end |
#url ⇒ Object
Returns the value of attribute url.
10 11 12 |
# File 'lib/tuiter/data/user.rb', line 10 def url @url end |