Class: Murmur::API::Channel

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

Instance Method Summary collapse

Constructor Details

#initialize(host, meta, server, channel) ⇒ Channel

Returns a new instance of Channel.



5
6
7
8
9
10
# File 'lib/murmur/channel.rb', line 5

def initialize(host, meta, server, channel)
    @host = host
    @meta = meta
    @server = server
    @channel = channel
end

Instance Method Details

#descriptionObject



52
53
54
# File 'lib/murmur/channel.rb', line 52

def description
    @channel.description
end

#description=(description) ⇒ Object



56
57
58
59
# File 'lib/murmur/channel.rb', line 56

def description=(description)
    @channel.description = description
    update
end

#idObject



12
13
14
# File 'lib/murmur/channel.rb', line 12

def id
    @channel.id
end


38
39
40
# File 'lib/murmur/channel.rb', line 38

def links
    @channel.links
end

#nameObject



16
17
18
# File 'lib/murmur/channel.rb', line 16

def name
    @channel.name
end

#name=(name) ⇒ Object



20
21
22
23
# File 'lib/murmur/channel.rb', line 20

def name=(name)
    @channel.name = name
    update
end

#parentObject



29
30
31
# File 'lib/murmur/channel.rb', line 29

def parent
    @server.channel(@channel.parent)
end

#parent=(id) ⇒ Object



33
34
35
36
# File 'lib/murmur/channel.rb', line 33

def parent=(id)
    @channel.parent = id
    update
end

#positionObject



61
62
63
# File 'lib/murmur/channel.rb', line 61

def position
    @channel.position
end

#position=(id) ⇒ Object



65
66
67
68
# File 'lib/murmur/channel.rb', line 65

def position=(id)
    @channel.position = id
    update
end

#serverObject



25
26
27
# File 'lib/murmur/channel.rb', line 25

def server
    @server
end

#temporary=(temp) ⇒ Object



47
48
49
50
# File 'lib/murmur/channel.rb', line 47

def temporary=(temp)
    @channel.temporary = temp
    update
end

#temporary?Boolean Also known as: temporary

Returns:

  • (Boolean)


42
43
44
# File 'lib/murmur/channel.rb', line 42

def temporary?
    @channel.temporary
end