Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment