Class: Slacks::GuestChannel
Instance Attribute Summary
Attributes inherited from Channel
#id, #name, #type
Instance Method Summary
collapse
Methods inherited from Channel
#==, #direct_message?, #inspect, #private_group?, #to_s, #typing
Constructor Details
#initialize(attributes) ⇒ GuestChannel
Returns a new instance of GuestChannel.
11
12
13
14
15
16
17
18
|
# File 'lib/slacks/guest_channel.rb', line 11
def initialize(attributes)
@id = attributes["channel_id"]
@name = attributes["channel_name"]
@type = :channel
@type = :group if id.start_with?("G")
@type = :direct_message if id.start_with?("D")
end
|
Instance Method Details
#guest? ⇒ Boolean
29
30
31
|
# File 'lib/slacks/guest_channel.rb', line 29
def guest?
true
end
|
#random_reply(*args) ⇒ Object
25
26
27
|
# File 'lib/slacks/guest_channel.rb', line 25
def random_reply(*args)
raise NotInChannelError, self
end
|
#reply(*args) ⇒ Object
Also known as:
say
20
21
22
|
# File 'lib/slacks/guest_channel.rb', line 20
def reply(*args)
raise NotInChannelError, self
end
|