Class: Twitch::Extension
- Inherits:
-
Object
- Object
- Twitch::Extension
- Defined in:
- lib/twitch/extension.rb
Overview
A feature used to augment dynamic information on a stream.
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
A Boolean value that determines the extension’s activation state.
-
#can_activate ⇒ Object
readonly
Whether the extension is configured such that it can be activated.
-
#id ⇒ Object
readonly
ID of the extension.
-
#name ⇒ Object
readonly
Name of the extension.
-
#type ⇒ Object
readonly
The extension types that you can activate for this extension.
-
#version ⇒ Object
readonly
Version number of the extension.
-
#x ⇒ Object
readonly
The x-coordinate where the extension is placed.
-
#y ⇒ Object
readonly
The y-coordinate where the extension is placed.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Extension
constructor
A new instance of Extension.
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
#active ⇒ Object (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_activate ⇒ Object (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 |
#id ⇒ Object (readonly)
ID of the extension.
7 8 9 |
# File 'lib/twitch/extension.rb', line 7 def id @id end |
#name ⇒ Object (readonly)
Name of the extension.
11 12 13 |
# File 'lib/twitch/extension.rb', line 11 def name @name end |
#type ⇒ Object (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 |
#version ⇒ Object (readonly)
Version number of the extension.
9 10 11 |
# File 'lib/twitch/extension.rb', line 9 def version @version end |
#x ⇒ Object (readonly)
The x-coordinate where the extension is placed.
27 28 29 |
# File 'lib/twitch/extension.rb', line 27 def x @x end |
#y ⇒ Object (readonly)
The y-coordinate where the extension is placed.
29 30 31 |
# File 'lib/twitch/extension.rb', line 29 def y @y end |