Class: Animoto::Assets::TitleCard
- Inherits:
-
Object
- Object
- Animoto::Assets::TitleCard
- Defined in:
- lib/animoto/assets/title_card.rb
Instance Attribute Summary collapse
-
#spotlit ⇒ Boolean
writeonly
Whether or not this image is spotlit.
-
#subtitle ⇒ String
The secondary text of this title card.
-
#title ⇒ String
The main text of this title card.
Instance Method Summary collapse
-
#initialize(title, subtitle = nil, options = {}) ⇒ Assets::TitleCard
constructor
Creates a new TitleCard.
-
#spotlit? ⇒ Boolean
Returns whether or not this image is spotlit.
-
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this TitleCard as a Hash.
Constructor Details
#initialize(title, subtitle = nil, options = {}) ⇒ Assets::TitleCard
Creates a new TitleCard.
30 31 32 33 |
# File 'lib/animoto/assets/title_card.rb', line 30 def initialize title, subtitle = nil, = {} @title, @subtitle = title, subtitle @spotlit = [:spotlit] end |
Instance Attribute Details
#spotlit=(value) ⇒ Boolean (writeonly)
Whether or not this image is spotlit. Spotlighting a visual tells to director to add more emphasis to this visual when directing.
15 16 17 |
# File 'lib/animoto/assets/title_card.rb', line 15 def spotlit=(value) @spotlit = value end |
#subtitle ⇒ String
The secondary text of this title card.
10 11 12 |
# File 'lib/animoto/assets/title_card.rb', line 10 def subtitle @subtitle end |
#title ⇒ String
The main text of this title card.
6 7 8 |
# File 'lib/animoto/assets/title_card.rb', line 6 def title @title end |
Instance Method Details
#spotlit? ⇒ Boolean
Returns whether or not this image is spotlit.
19 20 21 |
# File 'lib/animoto/assets/title_card.rb', line 19 def spotlit? @spotlit end |
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this TitleCard as a Hash.
38 39 40 41 42 43 44 |
# File 'lib/animoto/assets/title_card.rb', line 38 def to_hash hash = { 'type' => 'title_card' } hash['h1'] = title hash['h2'] = subtitle if subtitle hash['spotlit'] = spotlit? unless @spotlit.nil? hash end |