Sha256: 1324483e12bc3d4d3ba89f72186831247ea4d5ad9ec10d97a70311b731c872aa

Contents?: true

Size: 803 Bytes

Versions: 5

Compression:

Stored size: 803 Bytes

Contents

require 'animoto/postroll'

module Animoto
  class Postroll
    class CustomFootage < Animoto::Postroll

      # The URL to a video to insert into this custom footage postroll.
      # @return [String]
      attr_accessor :source_url

      # Creates a new postroll with custom footage at the supplied
      # URL.
      #
      # @param [String] source_url a url to a video file to be inserted into
      #   this custom postroll template
      # @return [Animoto::Postroll::CustomFootage]
      def initialize source_url
        super("custom_footage")
        @source_url = source_url
      end

      # Returns a representation of this postroll as a hash.
      #
      # @return [Hash{String=>Object}]
      def to_hash
        super.merge({'source_url' => source_url})
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
animoto-1.5.4 ./lib/animoto/postrolls/custom_footage.rb
animoto-1.5.3 ./lib/animoto/postrolls/custom_footage.rb
animoto-1.5.2 ./lib/animoto/postrolls/custom_footage.rb
animoto-1.5.1 ./lib/animoto/postrolls/custom_footage.rb
animoto-1.5.0 ./lib/animoto/postrolls/custom_footage.rb