Sha256: 272c3a4fca59db3c2f6c6d5320a23aff652cad1bd8afcfc2289d94b5a81373bb

Contents?: true

Size: 480 Bytes

Versions: 8

Compression:

Stored size: 480 Bytes

Contents

require 'twitter/factory'
require 'twitter/media/animated_gif'
require 'twitter/media/photo'
require 'twitter/media/video'

module Twitter
  class MediaFactory < Twitter::Factory
    class << self
      # Construct a new media object
      #
      # @param attrs [Hash]
      # @raise [IndexError] Error raised when supplied argument is missing a :type key.
      # @return [Twitter::Media]
      def new(attrs = {})
        super(:type, Media, attrs)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
twitter-7.0.0 lib/twitter/media_factory.rb
twitter-6.2.0 lib/twitter/media_factory.rb
twitter-6.1.0 lib/twitter/media_factory.rb
twitter-6.0.0 lib/twitter/media_factory.rb
twitter-5.17.0 lib/twitter/media_factory.rb
twitter-5.16.0 lib/twitter/media_factory.rb
twitter-5.15.0 lib/twitter/media_factory.rb
twitter-5.14.0 lib/twitter/media_factory.rb