Class: OnyxCord::Components::MediaGallery::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/onyxcord/models/component.rb

Overview

A singular media attachment.

Instance Attribute Summary collapse

Instance Attribute Details

#descriptionString? (readonly)

Returns the alternative text for the gallery item's media.

Returns:

  • (String, nil)

    the alternative text for the gallery item's media.



348
349
350
# File 'lib/onyxcord/models/component.rb', line 348

def description
  @description
end

#mediaMediaItem (readonly)

Returns the unfurled media content of the gallery item.

Returns:

  • (MediaItem)

    the unfurled media content of the gallery item.



340
341
342
# File 'lib/onyxcord/models/component.rb', line 340

def media
  @media
end

#spoilertrue, false (readonly) Also known as: spoiler?

Returns whether or not the gallery item's media should be blurred out.

Returns:

  • (true, false)

    whether or not the gallery item's media should be blurred out.



344
345
346
# File 'lib/onyxcord/models/component.rb', line 344

def spoiler
  @spoiler
end