twitter-status-bot/.gems/gems/twitter-5.11.0/lib/twitter/media_factory.rb

18 lines
413 B
Ruby
Raw Normal View History

require 'twitter/factory'
require 'twitter/media/photo'
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