Class: Yt::Annotations::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/yt/annotations/base.rb

Overview

An abstract class with common attributes for every type of annotation.

Direct Known Subclasses

Card, EndScreen, Note, Promotion

Instance Attribute Summary collapse

Instance Attribute Details

#ends_atFloat (readonly)

Returns when the annotation disappears (in seconds).

Returns:

  • (Float)

    when the annotation disappears (in seconds).



12
13
14
# File 'lib/yt/annotations/base.rb', line 12

def ends_at
  @ends_at
end

Returns what the annotation links.

Returns:

  • (Hash, nil)

    what the annotation links.



15
16
17
# File 'lib/yt/annotations/base.rb', line 15

def link
  @link
end

#starts_atFloat (readonly)

Returns when the annotation appears (in seconds).

Returns:

  • (Float)

    when the annotation appears (in seconds).



9
10
11
# File 'lib/yt/annotations/base.rb', line 9

def starts_at
  @starts_at
end

#textString (readonly)

Returns the text of the annotation.

Returns:

  • (String)

    the text of the annotation.



6
7
8
# File 'lib/yt/annotations/base.rb', line 6

def text
  @text
end