Class: Twitch::Moderator
- Inherits:
-
Object
- Object
- Twitch::Moderator
- Defined in:
- lib/twitch/moderator.rb
Overview
A user who wields some form of power in a broadcaster’s Twitch chat. This is simply a user ID/name pair.
Instance Attribute Summary collapse
-
#user_id ⇒ Object
readonly
User ID of the moderator.
-
#user_login ⇒ Object
readonly
The user’s login name.
-
#user_name ⇒ Object
readonly
The user’s display name.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Moderator
constructor
A new instance of Moderator.
Constructor Details
#initialize(attributes = {}) ⇒ Moderator
Returns a new instance of Moderator.
14 15 16 17 18 |
# File 'lib/twitch/moderator.rb', line 14 def initialize(attributes = {}) attributes.each do |key, value| instance_variable_set "@#{key}", value end end |
Instance Attribute Details
#user_id ⇒ Object (readonly)
User ID of the moderator.
8 9 10 |
# File 'lib/twitch/moderator.rb', line 8 def user_id @user_id end |
#user_login ⇒ Object (readonly)
The user’s login name.
10 11 12 |
# File 'lib/twitch/moderator.rb', line 10 def user_login @user_login end |
#user_name ⇒ Object (readonly)
The user’s display name.
12 13 14 |
# File 'lib/twitch/moderator.rb', line 12 def user_name @user_name end |