Class: Twitch::CheermoteTierImages

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

Overview

Data class for Cheermote Tier images by themes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CheermoteTierImages

Returns a new instance of CheermoteTierImages.



15
16
17
18
19
# File 'lib/twitch/cheermote_tier_images.rb', line 15

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

Instance Attribute Details

#darkObject (readonly)

The theme keys are ‘dark` and `light`. 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.



12
13
14
# File 'lib/twitch/cheermote_tier_images.rb', line 12

def dark
  @dark
end

#lightObject (readonly)

Returns the value of attribute light.



13
14
15
# File 'lib/twitch/cheermote_tier_images.rb', line 13

def light
  @light
end