Sha256: 0caa8e7e29f3a0b5719a96509111f22e55cf2f1c500940b322868715671d311e

Contents?: true

Size: 400 Bytes

Versions: 18

Compression:

Stored size: 400 Bytes

Contents

require 'twitter/factory'
require 'twitter/media/photo'

module Twitter
  class MediaFactory < Twitter::Factory

    # Instantiates a new media object
    #
    # @param attrs [Hash]
    # @raise [ArgumentError] Error raised when supplied argument is missing a :type key.
    # @return [Twitter::Media]
    def self.fetch_or_new(attrs={})
      super(:type, Twitter::Media, attrs)
    end

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
twitter-4.8.1 lib/twitter/media_factory.rb
twitter-4.8.0 lib/twitter/media_factory.rb
twitter-4.7.0 lib/twitter/media_factory.rb
twitter-4.6.2 lib/twitter/media_factory.rb
twitter-4.6.1 lib/twitter/media_factory.rb
twitter-4.6.0 lib/twitter/media_factory.rb
twitter-4.5.0 lib/twitter/media_factory.rb
twitter-4.4.4 lib/twitter/media_factory.rb
twitter-4.4.3 lib/twitter/media_factory.rb
twitter-4.4.2 lib/twitter/media_factory.rb
twitter-4.4.1 lib/twitter/media_factory.rb
twitter-4.4.0 lib/twitter/media_factory.rb
twitter-4.3.0 lib/twitter/media_factory.rb
twitter-4.2.0 lib/twitter/media_factory.rb
twitter-4.1.2 lib/twitter/media_factory.rb
twitter-4.1.1 lib/twitter/media_factory.rb
twitter-4.1.0 lib/twitter/media_factory.rb
twitter-4.0.0 lib/twitter/media_factory.rb