Sha256: 0f6f76371cc31c4931680bab0e7da77c125ca5d2f789e9feaf3dd4f109570465

Contents?: true

Size: 510 Bytes

Versions: 2

Compression:

Stored size: 510 Bytes

Contents

module Animoto
  class Asset
    
    attr_accessor :source
    
    def initialize source, options = {}
      @source = source
    end
    
    # Returns a representation of this asset as a Hash. Used mainly for generating
    # manifests.
    #
    # @return [Hash] this asset as a Hash
    def to_hash
      { 'source' => @source }
    end
    
    # Returns a representation of this asset as JSON.
    #
    # @return [String] this asset as JSON
    def to_json
      self.to_hash.to_json
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
animoto-0.0.0.alpha3 ./lib/animoto/asset.rb
animoto-0.0.0.alpha2 ./lib/animoto/asset.rb