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.


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

#idObject (readonly)

ID of the game.


6
7
8
# File 'lib/twitch/game.rb', line 6

def id
  @id
end

#nameObject (readonly)

Name of the game


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

def name
  @name
end