Class: Twitch::UserFollow
- Inherits:
-
Object
- Object
- Twitch::UserFollow
- Defined in:
- lib/twitch/user_follow.rb
Overview
Represents a relationship of one user following another.
Instance Attribute Summary collapse
-
#followed_at ⇒ Object
readonly
Date at which the follow action was performed.
-
#from_id ⇒ Object
readonly
User ID of the following user.
-
#to_id ⇒ Object
readonly
User ID of the followed user.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ UserFollow
constructor
A new instance of UserFollow.
Constructor Details
#initialize(attributes = {}) ⇒ UserFollow
Returns a new instance of UserFollow.
11 12 13 14 15 |
# File 'lib/twitch/user_follow.rb', line 11 def initialize(attributes = {}) @from_id = attributes['from_id'] @to_id = attributes['to_id'] @followed_at = Time.iso8601(attributes['followed_at']) end |
Instance Attribute Details
#followed_at ⇒ Object (readonly)
Date at which the follow action was performed.
9 10 11 |
# File 'lib/twitch/user_follow.rb', line 9 def followed_at @followed_at end |
#from_id ⇒ Object (readonly)
User ID of the following user.
5 6 7 |
# File 'lib/twitch/user_follow.rb', line 5 def from_id @from_id end |
#to_id ⇒ Object (readonly)
User ID of the followed user.
7 8 9 |
# File 'lib/twitch/user_follow.rb', line 7 def to_id @to_id end |