module Terraspace::Hooks::Dsl

Public Instance Methods

after(*commands, **props) click to toggle source
# File lib/terraspace/hooks/dsl.rb, line 9
def after(*commands, **props)
  commands.each do |name|
    each_hook(:after, name, props)
  end
end
before(*commands, **props) click to toggle source
# File lib/terraspace/hooks/dsl.rb, line 3
def before(*commands, **props)
  commands.each do |name|
    each_hook(:before, name, props)
  end
end
each_hook(type, name, props={}) click to toggle source
# File lib/terraspace/hooks/dsl.rb, line 15
def each_hook(type, name, props={})
  @hooks[type][name] ||= []
  @hooks[type][name] << props
end