Created
March 5, 2009 19:49
-
-
Save julik/74519 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VideoUpload | |
def self.new(*posargs_or_options) | |
if posargs_or_options.length > 1 # use old-style positional args | |
YouTubeG.logger.error "Positional arguments for VideoUpload.new are deprecated" | |
new(translate_posargs(posargs_or_options) | |
else | |
super(any_args.first || {}) # use the kwargs, super is just vanilla constructor | |
end | |
end | |
private | |
def self.translate_posargs(user, pass, dev_key, client_id = 'youtube_g') | |
{ :user => user, :password => pass, :dev_key => dev_key, :client_id => client_id } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment