Sha256: 740700c6f4451033e157656d21574da9613a491603689431b196c0ebea13d967

Contents?: true

Size: 628 Bytes

Versions: 4

Compression:

Stored size: 628 Bytes

Contents

module Animoto
  module Assets

    # @abstract
    class Base
      
      # The URL of this asset.
      # @return [String]
      attr_accessor :source
      
      # Creates a new asset.
      #
      # @param [String] source the URL of this asset
      # @return [Assets::Base] the asset
      def initialize source, options = {}
        @source = source
      end
    
      # Returns a representation of this asset as a Hash. Used mainly for generating
      # manifests.
      #
      # @return [Hash{String=>Object}] this asset as a Hash
      def to_hash
        { 'source_url' => @source }
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
animoto-1.2.0 ./lib/animoto/assets/base.rb
animoto-1.1.1 ./lib/animoto/assets/base.rb
animoto-1.1.0 ./lib/animoto/assets/base.rb
animoto-1.0.0 ./lib/animoto/assets/base.rb