Sha256: e66006b52737f2bee5a27049bfbf448a62ecb681baabdcf980b0b99ef5f1e806

Contents?: true

Size: 796 Bytes

Versions: 3

Compression:

Stored size: 796 Bytes

Contents

module Animoto
  module Support
    module Coverable
    
      # Setter for cover, which makes this visual the cover for the video. Only
      # one image or piece of footage in a manifest can be declared the cover.
      #
      # @param [Boolean] bool true if this visual should be the cover
      def cover= bool
        @cover = bool
      end
    
      # Returns true if this visual is the cover.
      #
      # @return [Boolean] whether or not this visual is the cover
      def cover?
        @cover
      end
    
      # Returns a representation of this visual as a Hash.
      #
      # @return [Hash<String,Object>] this visual as a Hash
      def to_hash
        hash = super rescue {}
        hash['cover'] = cover? unless @cover.nil?
        hash
      end
    
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
animoto-0.1.1.beta1 ./lib/animoto/support/coverable.rb
animoto-0.1.0.beta1 ./lib/animoto/support/coverable.rb
animoto-0.1.0.beta0 ./lib/animoto/support/coverable.rb