Class: Twitch::Game
- Inherits:
-
Object
- Object
- Twitch::Game
- Defined in:
- lib/twitch/game.rb
Overview
A filterable category for a stream. (not necessarily limited to games, e.g. ‘IRL’)
Instance Attribute Summary collapse
-
#box_art_url ⇒ Object
readonly
Box art URL template.
-
#id ⇒ Object
readonly
ID of the game.
-
#name ⇒ Object
readonly
Name of the game.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Game
constructor
A new instance of Game.
Constructor Details
#initialize(attributes = {}) ⇒ Game
Returns a new instance of Game.
17 18 19 20 21 |
# File 'lib/twitch/game.rb', line 17 def initialize(attributes = {}) @id = attributes['id'] @name = attributes['name'] @box_art_url = attributes['box_art_url'] end |
Instance Attribute Details
#box_art_url ⇒ Object (readonly)
Box art URL template.
Substitute the width and height string tokens with your desired numeric values.
15 16 17 |
# File 'lib/twitch/game.rb', line 15 def box_art_url @box_art_url end |
#id ⇒ Object (readonly)
ID of the game.
8 9 10 |
# File 'lib/twitch/game.rb', line 8 def id @id end |
#name ⇒ Object (readonly)
Name of the game
10 11 12 |
# File 'lib/twitch/game.rb', line 10 def name @name end |