Class: RubyCord::Message::Sticker
- Inherits:
-
Object
- Object
- RubyCord::Message::Sticker
- Defined in:
- lib/rubycord/message_meta.rb
Overview
Represents a sticker.
Instance Attribute Summary collapse
-
#format ⇒ Symbol
readonly
The sticker format.
-
#id ⇒ RubyCord::Snowflake
readonly
The sticker ID.
-
#name ⇒ String
readonly
The sticker name.
Instance Method Summary collapse
-
#initialize(data) ⇒ Sticker
constructor
A new instance of Sticker.
- #inspect ⇒ Object
Constructor Details
#initialize(data) ⇒ Sticker
Returns a new instance of Sticker.
115 116 117 118 119 |
# File 'lib/rubycord/message_meta.rb', line 115 def initialize(data) @id = Snowflake.new(data[:id]) @name = data[:name] @format = RubyCord::Sticker::STICKER_FORMAT[data[:format]] end |
Instance Attribute Details
#format ⇒ Symbol (readonly)
Returns The sticker format.
113 114 115 |
# File 'lib/rubycord/message_meta.rb', line 113 def format @format end |
#id ⇒ RubyCord::Snowflake (readonly)
Returns The sticker ID.
109 110 111 |
# File 'lib/rubycord/message_meta.rb', line 109 def id @id end |
#name ⇒ String (readonly)
Returns The sticker name.
111 112 113 |
# File 'lib/rubycord/message_meta.rb', line 111 def name @name end |
Instance Method Details
#inspect ⇒ Object
121 122 123 |
# File 'lib/rubycord/message_meta.rb', line 121 def inspect "#<#{self.class.name} #{@id}: #{@name} format=#{@format}>" end |