Class: Twitch::CheermoteTierImage

Inherits:
Object
  • Object
show all
Defined in:
lib/twitch/cheermote_tier_image.rb

Overview

Data class for Cheermote Tier image, static and animated

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CheermoteTierImage

Returns a new instance of CheermoteTierImage.



12
13
14
15
16
# File 'lib/twitch/cheermote_tier_image.rb', line 12

def initialize(attributes = {})
  attributes.each do |key, value|
    instance_variable_set "@#{key}", value
  end
end

Instance Attribute Details

#animatedObject (readonly)

Each theme is a dictionary of formats: ‘animated` and `static`. Each format is a dictionary of sizes: `1`, `1.5`, `2`, `3`, and `4`. The value of each size contains the URL to the image.



9
10
11
# File 'lib/twitch/cheermote_tier_image.rb', line 9

def animated
  @animated
end

#staticObject (readonly)

Returns the value of attribute static.



10
11
12
# File 'lib/twitch/cheermote_tier_image.rb', line 10

def static
  @static
end