Sha256: 7971635e850efb467b23889688be1e11ecf80c33857d34085ccdf465afd03bfa

Contents?: true

Size: 726 Bytes

Versions: 3

Compression:

Stored size: 726 Bytes

Contents

module Animoto
  module Assets
    class Image < Animoto::Assets::Base
      include Support::Visual
      include Support::Coverable

      # The EXIF rotation value for how this image should be rotated in the video.
      # @return [Integer]
      attr_accessor :rotation
    
      # Returns a representation of this Image as a Hash.
      #
      # @return [Hash<String,Object>] this asset as a Hash
      # @see Animoto::Support::Visual#to_hash
      # @see Animoto::Assets::Base#to_hash
      def to_hash
        hash = super
        hash['rotation'] = rotation if rotation
        hash['spotlit'] = spotlit? unless @spotlit.nil?
        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/assets/image.rb
animoto-0.1.0.beta1 ./lib/animoto/assets/image.rb
animoto-0.1.0.beta0 ./lib/animoto/assets/image.rb