Sha256: bc0b72fdda07f8821097d56bd0eeaddbb154cc653cefae26957332aeebc8c6fb

Contents?: true

Size: 727 Bytes

Versions: 4

Compression:

Stored size: 727 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

4 entries across 4 versions & 1 rubygems

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