Accept a list of options in #push signature

This commit is contained in:
Seth Vargo 2014-10-22 22:03:11 -04:00
parent 5b9240ad8a
commit 72affa0a10
1 changed files with 4 additions and 2 deletions

View File

@ -224,11 +224,13 @@ module Vagrant
# Registers additional pushes to be available.
#
# @param [String] name Name of the push.
def self.push(name=UNSET_VALUE, &block)
def self.push(name=UNSET_VALUE, options=nil, &block)
data[:pushes] ||= Registry.new
# Register a new pusher class only if a name was given
data[:pushes].register(name.to_sym, &block) if name != UNSET_VALUE
if name != UNSET_VALUE
data[:pushes].register(name.to_sym) { [block.call, options] }
end
# Return the registry
data[:pushes]