Trigger plugin cleanup

This commit is contained in:
Brian Cain 2018-03-30 16:28:23 -07:00
parent c832168846
commit ca672eb8e6
No known key found for this signature in database
GPG Key ID: 43D51080D357A001
2 changed files with 2 additions and 7 deletions

View File

@ -49,9 +49,6 @@ module VagrantPlugins
# so the last element should be the "config block"
# and the rest are commands for the trigger
blk = command.pop
else
# TODO:
# No config block given at all, validation step should throw error?
end
command.each do |cmd|
@ -68,14 +65,12 @@ module VagrantPlugins
def after(*command, &block)
command.flatten!
blk = block
if !block_given? && command.last.is_a?(Hash)
# We were given a hash rather than a block,
# so the last element should be the "config block"
# and the rest are commands for the trigger
blk = command.pop
else
# TODO:
# No config block given at all, validation step should throw error?
end
command.each do |cmd|

View File

@ -17,7 +17,7 @@ module VagrantPlugins
# Note: This is for internal use only.
#
# @return [String]
attr_accessor :id
attr_reader :id
# Name for the given Trigger. Defaults to nil.
#