Class: SE::API::User
- Inherits:
-
Object
- Object
- SE::API::User
- Defined in:
- lib/se/api/types/user.rb
Instance Attribute Summary collapse
-
#accept_rate ⇒ Object
readonly
Returns the value of attribute accept_rate.
-
#badge_counts ⇒ Object
readonly
Returns the value of attribute badge_counts.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#reputation ⇒ Object
readonly
Returns the value of attribute reputation.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(item_json) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(item_json) ⇒ User
Returns a new instance of User.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/se/api/types/user.rb', line 6 def initialize(item_json) @json = Hash(item_json) @accept_rate = @json["accept_rate"] @badge_counts = @json["badge_counts"] @name = @json["display_name"] @link = @json["link"] @image = @json["profile_image"] @reputation = @json["reputation"] @id = @json["user_id"] @type = @json["user_type"] end |
Instance Attribute Details
#accept_rate ⇒ Object (readonly)
Returns the value of attribute accept_rate.
4 5 6 |
# File 'lib/se/api/types/user.rb', line 4 def accept_rate @accept_rate end |
#badge_counts ⇒ Object (readonly)
Returns the value of attribute badge_counts.
4 5 6 |
# File 'lib/se/api/types/user.rb', line 4 def badge_counts @badge_counts end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/se/api/types/user.rb', line 4 def id @id end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
4 5 6 |
# File 'lib/se/api/types/user.rb', line 4 def image @image end |
#json ⇒ Object (readonly)
Returns the value of attribute json.
4 5 6 |
# File 'lib/se/api/types/user.rb', line 4 def json @json end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
4 5 6 |
# File 'lib/se/api/types/user.rb', line 4 def link @link end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/se/api/types/user.rb', line 4 def name @name end |
#reputation ⇒ Object (readonly)
Returns the value of attribute reputation.
4 5 6 |
# File 'lib/se/api/types/user.rb', line 4 def reputation @reputation end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/se/api/types/user.rb', line 4 def type @type end |