Class: Twitch::Chat::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/twitch/chat/channel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Channel

Returns a new instance of Channel.



6
7
8
9
# File 'lib/twitch/chat/channel.rb', line 6

def initialize(name)
  @name = name
  @moderators = []
end

Instance Attribute Details

#moderatorsObject (readonly)

Returns the value of attribute moderators.



4
5
6
# File 'lib/twitch/chat/channel.rb', line 4

def moderators
  @moderators
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/twitch/chat/channel.rb', line 4

def name
  @name
end

Instance Method Details

#add_moderator(moderator) ⇒ Object



11
12
13
# File 'lib/twitch/chat/channel.rb', line 11

def add_moderator(moderator)
  @moderators << moderator
end

#remove_moderator(moderator) ⇒ Object



15
16
17
# File 'lib/twitch/chat/channel.rb', line 15

def remove_moderator(moderator)
  @moderators.delete(moderator)
end