Class: Twitch::Extension

Inherits:
Object
  • Object
show all
Defined in:
lib/twitch/extension.rb

Overview

A feature used to augment dynamic information on a stream.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Extension

Returns a new instance of Extension.



31
32
33
34
35
# File 'lib/twitch/extension.rb', line 31

def initialize(attributes = {})
  attributes.each do |key, value|
    instance_variable_set "@#{key}", value
  end
end

Instance Attribute Details

#activeObject (readonly)

A Boolean value that determines the extension’s activation state. If false, the user has not configured this component extension.



22
23
24
# File 'lib/twitch/extension.rb', line 22

def active
  @active
end

#can_activateObject (readonly)

Whether the extension is configured such that it can be activated.



13
14
15
# File 'lib/twitch/extension.rb', line 13

def can_activate
  @can_activate
end

#idObject (readonly)

ID of the extension.



7
8
9
# File 'lib/twitch/extension.rb', line 7

def id
  @id
end

#nameObject (readonly)

Name of the extension.



11
12
13
# File 'lib/twitch/extension.rb', line 11

def name
  @name
end

#typeObject (readonly)

The extension types that you can activate for this extension. Possible values are: ‘component`, `mobile`, `overlay`, `panel`



16
17
18
# File 'lib/twitch/extension.rb', line 16

def type
  @type
end

#versionObject (readonly)

Version number of the extension.



9
10
11
# File 'lib/twitch/extension.rb', line 9

def version
  @version
end

#xObject (readonly)

The x-coordinate where the extension is placed.



27
28
29
# File 'lib/twitch/extension.rb', line 27

def x
  @x
end

#yObject (readonly)

The y-coordinate where the extension is placed.



29
30
31
# File 'lib/twitch/extension.rb', line 29

def y
  @y
end