Class: Discorb::Presence::Activity::Asset

Inherits:
DiscordModel show all
Defined in:
lib/discorb/presence.rb

Overview

Represents the assets of an activity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DiscordModel

#==, #eql?, #inspect

Constructor Details

#initialize(data) ⇒ Asset

Returns a new instance of Asset.



223
224
225
226
227
228
# File 'lib/discorb/presence.rb', line 223

def initialize(data)
  @large_image = data[:large_image]
  @large_text = data[:large_text]
  @small_image = data[:small_image]
  @small_text = data[:small_text]
end

Instance Attribute Details

#large_imageString (readonly) Also known as: large_id

Returns The large image ID or URL of the asset.

Returns:

  • (String)

    The large image ID or URL of the asset.



213
214
215
# File 'lib/discorb/presence.rb', line 213

def large_image
  @large_image
end

#large_textString (readonly)

Returns The large text of the activity.

Returns:

  • (String)

    The large text of the activity.



216
217
218
# File 'lib/discorb/presence.rb', line 216

def large_text
  @large_text
end

#small_imageString (readonly) Also known as: small_id

Returns The small image ID or URL of the activity.

Returns:

  • (String)

    The small image ID or URL of the activity.



218
219
220
# File 'lib/discorb/presence.rb', line 218

def small_image
  @small_image
end

#small_textString (readonly)

Returns The small text of the activity.

Returns:

  • (String)

    The small text of the activity.



221
222
223
# File 'lib/discorb/presence.rb', line 221

def small_text
  @small_text
end