Class: Animoto::Postroll
- Inherits:
-
Object
- Object
- Animoto::Postroll
- Defined in:
- lib/animoto/postroll.rb,
lib/animoto/postrolls/custom_footage.rb
Direct Known Subclasses
Defined Under Namespace
Classes: CustomFootage
Constant Summary collapse
- POWERED_BY_ANIMOTO =
new("powered_by_animoto").freeze
- WHITE_LABEL =
new("white_label").freeze
Instance Attribute Summary collapse
-
#template ⇒ String
readonly
The template name for this postroll.
Class Method Summary collapse
-
.new(*args) ⇒ Animoto::Postroll
Constructs a new postroll.
Instance Method Summary collapse
-
#initialize(template) ⇒ Animoto::Postroll
constructor
Creates a new Postroll with the given template name.
-
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this postroll as a hash.
Constructor Details
#initialize(template) ⇒ Animoto::Postroll
Creates a new Postroll with the given template name.
21 22 23 |
# File 'lib/animoto/postroll.rb', line 21 def initialize template @template = template end |
Instance Attribute Details
#template ⇒ String (readonly)
The template name for this postroll.
15 16 17 |
# File 'lib/animoto/postroll.rb', line 15 def template @template end |
Class Method Details
.new(*args) ⇒ Animoto::Postroll
Constructs a new postroll. If given a Postroll object, returns it. Otherwise, passes the arguments to the constructor for this Postroll class.
9 10 11 |
# File 'lib/animoto/postroll.rb', line 9 def self.new *args args.first.is_a?(self) ? args.first : super end |
Instance Method Details
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this postroll as a hash.
27 28 29 |
# File 'lib/animoto/postroll.rb', line 27 def to_hash {'template' => @template} end |