Class: Channel
- Inherits:
-
Object
- Object
- Channel
- Defined in:
- src/models/channel.rb
Overview
Describes and provides operations on a particular Slack channel
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
The channel id.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Compare channels by ID.
-
#direct_message? ⇒ Boolean
Check if the channel is a direct message one.
Instance Attribute Details
#id ⇒ String (readonly)
Returns the channel id
4 5 6 |
# File 'src/models/channel.rb', line 4 def id @id end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Compare channels by ID
16 17 18 |
# File 'src/models/channel.rb', line 16 def ==(other) @id == other.id end |
#direct_message? ⇒ Boolean
Check if the channel is a direct message one
30 31 32 |
# File 'src/models/channel.rb', line 30 def @id[0] == 'D' end |