Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (14 sloc) 0.4 kb
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
Jump to Line
Something went wrong with that request. Please try again.