Sha256: 81ff1a1f004389d3304696d16615f0eebbacde0327e7b66abc3f578b3126f359
Contents?: true
Size: 919 Bytes
Versions: 4
Compression:
Stored size: 919 Bytes
Contents
module Animoto module Assets class TitleCard include Support::Visual # The main text of this title card. # @return [String] attr_accessor :title # The secondary text of this title card. # @return [String] attr_accessor :subtitle # Creates a new TitleCard. # # @param [String] title the main text # @param [String] subtitle the secondary text def initialize title, subtitle = nil @title, @subtitle = title, subtitle end # Returns a representation of this TitleCard as a Hash. # # @return [Hash{String=>Object}] this TitleCard as a Hash # @see Animoto::Support::Visual#to_hash def to_hash hash = super hash['h1'] = title hash['h2'] = subtitle if subtitle hash['spotlit'] = spotlit? unless @spotlit.nil? hash end end end end
Version data entries
4 entries across 4 versions & 1 rubygems