Class: Twitch::Game

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_urlObject (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

#idObject (readonly)

ID of the game.



8
9
10
# File 'lib/twitch/game.rb', line 8

def id
  @id
end

#nameObject (readonly)

Name of the game



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

def name
  @name
end