Class: Discorb::DefaultAvatar
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::DefaultAvatar
- Defined in:
- lib/discorb/asset.rb
Overview
Represents a default avatar.
Instance Attribute Summary collapse
-
#animated? -> false
readonly
For compatibility with Asset, always
false
.
Instance Method Summary collapse
- #inspect -> Object
-
#url(image_format: nil, size: 1024) -> String
Returns the URL of the avatar.
Methods inherited from DiscordModel
Instance Attribute Details
#animated? -> false (readonly)
Returns For compatibility with Asset, always false
.
|
# File 'lib/discorb/asset.rb', line 69
|
Instance Method Details
#inspect -> Object
98 99 100 |
# File 'lib/discorb/asset.rb', line 98 def inspect "#<#{self.class} #{@discriminator}>" end |
#url(image_format: nil, size: 1024) -> String
Returns the URL of the avatar.
rubocop: disable Lint/UnusedMethodArgument
93 94 95 96 |
# File 'lib/discorb/asset.rb', line 93 def url(image_format: nil, size: 1024) # rubocop: enable Lint/UnusedMethodArgument "https://cdn.discordapp.com/embed/avatars/#{@discriminator.to_i % 5}.png" end |