Class: Twitch::Moderator

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_idObject (readonly)

User ID of the moderator.



8
9
10
# File 'lib/twitch/moderator.rb', line 8

def user_id
  @user_id
end

#user_loginObject (readonly)

The user’s login name.



10
11
12
# File 'lib/twitch/moderator.rb', line 10

def 
  @user_login
end

#user_nameObject (readonly)

The user’s display name.



12
13
14
# File 'lib/twitch/moderator.rb', line 12

def user_name
  @user_name
end