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?, #hash

Constructor Details

#initialize(data) -> Asset

Returns a new instance of Asset.



189
190
191
192
193
194
# File 'lib/discorb/presence.rb', line 189

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_image -> String (readonly) Also known as: large_id

Returns The large image ID of the asset.

Returns:

  • (String)

    The large image ID of the asset.



179
180
181
# File 'lib/discorb/presence.rb', line 179

def large_image
  @large_image
end

#large_text -> String (readonly)

Returns The large text of the activity.

Returns:

  • (String)

    The large text of the activity.



182
183
184
# File 'lib/discorb/presence.rb', line 182

def large_text
  @large_text
end

#small_image -> String (readonly) Also known as: small_id

Returns The small image ID of the activity.

Returns:

  • (String)

    The small image ID of the activity.



184
185
186
# File 'lib/discorb/presence.rb', line 184

def small_image
  @small_image
end

#small_text -> String (readonly)

Returns The small text of the activity.

Returns:

  • (String)

    The small text of the activity.



187
188
189
# File 'lib/discorb/presence.rb', line 187

def small_text
  @small_text
end