Class: Mumble::Channel
- Inherits:
-
Model
- Object
- Model
- Mumble::Channel
show all
- Defined in:
- lib/mumble-ruby/channel.rb
Instance Method Summary
collapse
Methods inherited from Model
attribute, attributes, #initialize, #inspect, #update
Constructor Details
This class inherits a constructor from Mumble::Model
Instance Method Details
#children ⇒ Object
18
19
20
21
22
|
# File 'lib/mumble-ruby/channel.rb', line 18
def children
client.channels.values.select do |channel|
channel.parent_id == channel_id
end
end
|
#join ⇒ Object
36
37
38
|
# File 'lib/mumble-ruby/channel.rb', line 36
def join
client.join_channel(self)
end
|
#linked_channels ⇒ Object
24
25
26
27
28
|
# File 'lib/mumble-ruby/channel.rb', line 24
def linked_channels
links.map do |channel_id|
client.channels[channel_id]
end
end
|
#parent ⇒ Object
14
15
16
|
# File 'lib/mumble-ruby/channel.rb', line 14
def parent
client.channels[parent_id]
end
|
#send_image(file) ⇒ Object
44
45
46
|
# File 'lib/mumble-ruby/channel.rb', line 44
def send_image(file)
client.text_channel_img(self, file)
end
|
#send_text(string) ⇒ Object
40
41
42
|
# File 'lib/mumble-ruby/channel.rb', line 40
def send_text(string)
client.text_channel(self, string)
end
|
#users ⇒ Object
30
31
32
33
34
|
# File 'lib/mumble-ruby/channel.rb', line 30
def users
client.users.values.select do |user|
user.channel_id == channel_id
end
end
|