Trigger plugin cleanup
This commit is contained in:
parent
c832168846
commit
ca672eb8e6
|
@ -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|
|
||||
|
|
|
@ -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.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue