Class: Twitch::CheermoteTierImages
- Inherits:
-
Object
- Object
- Twitch::CheermoteTierImages
- Defined in:
- lib/twitch/cheermote_tier_images.rb
Overview
Data class for Cheermote Tier images by themes
Instance Attribute Summary collapse
-
#dark ⇒ Object
readonly
The theme keys are ‘dark` and `light`.
-
#light ⇒ Object
readonly
Returns the value of attribute light.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ CheermoteTierImages
constructor
A new instance of CheermoteTierImages.
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
#dark ⇒ Object (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 |
#light ⇒ Object (readonly)
Returns the value of attribute light.
13 14 15 |
# File 'lib/twitch/cheermote_tier_images.rb', line 13 def light @light end |