Class: RubyCord::Channel Abstract
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- RubyCord::Channel
- Defined in:
- lib/rubycord/channel.rb
Overview
This class is abstract.
Represents a channel of Discord.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ RubyCord::Snowflake
readonly
The ID of the channel.
-
#name ⇒ String
readonly
The name of the channel.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Checks if the channel is other channel.
-
#inspect ⇒ String
Object class and attributes.
- #type ⇒ Object
Methods inherited from DiscordModel
Instance Attribute Details
#id ⇒ RubyCord::Snowflake (readonly)
Returns The ID of the channel.
10 11 12 |
# File 'lib/rubycord/channel.rb', line 10 def id @id end |
#name ⇒ String (readonly)
Returns The name of the channel.
12 13 14 |
# File 'lib/rubycord/channel.rb', line 12 def name @name end |
Instance Method Details
#==(other) ⇒ Boolean
Checks if the channel is other channel.
38 39 40 41 42 |
# File 'lib/rubycord/channel.rb', line 38 def ==(other) return false unless other.respond_to?(:id) @id == other.id end |
#inspect ⇒ String
Returns Object class and attributes.
45 46 47 |
# File 'lib/rubycord/channel.rb', line 45 def inspect "#<#{self.class} \"##{@name}\" id=#{@id}>" end |
#type ⇒ Object
85 86 87 |
# File 'lib/rubycord/channel.rb', line 85 def type self.class.channel_type end |