Class: RubyCord::DefaultAvatar
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- RubyCord::DefaultAvatar
- Defined in:
- lib/rubycord/asset.rb
Overview
Represents a default avatar.
Instance Attribute Summary collapse
- #animated? ⇒ false readonly
Instance Method Summary collapse
-
#inspect ⇒ String
Object class and attributes.
-
#url(image_format: nil, size: 1024) ⇒ String
Returns the URL of the avatar.
Methods inherited from DiscordModel
Instance Attribute Details
#animated? ⇒ false (readonly)
|
# File 'lib/rubycord/asset.rb', line 71
|
Instance Method Details
#inspect ⇒ String
Returns Object class and attributes.
102 103 104 |
# File 'lib/rubycord/asset.rb', line 102 def inspect "#<#{self.class} #{@discriminator}>" end |
#url(image_format: nil, size: 1024) ⇒ String
Returns the URL of the avatar.
rubocop: disable Lint/UnusedMethodArgument
96 97 98 99 |
# File 'lib/rubycord/asset.rb', line 96 def url(image_format: nil, size: 1024) # rubocop: enable Lint/UnusedMethodArgument "https://cdn.discordapp.com/embed/avatars/#{@discriminator.to_i % 5}.png" end |