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.
15 16 17 18 19 |
# File 'lib/twitch/game.rb', line 15 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.
13 14 15 |
# File 'lib/twitch/game.rb', line 13 def box_art_url @box_art_url end |
#id ⇒ Object (readonly)
ID of the game.
6 7 8 |
# File 'lib/twitch/game.rb', line 6 def id @id end |
#name ⇒ Object (readonly)
Name of the game
8 9 10 |
# File 'lib/twitch/game.rb', line 8 def name @name end |