lib/jets/lambda/dsl.rb in jets-1.7.2 vs lib/jets/lambda/dsl.rb in jets-1.8.0
- old
+ new
@@ -211,15 +211,25 @@
n += 1
end
@associated_resources = numbered_resources
end
+ # Examples:
+ #
+ # depends_on :custom
+ # depends_on :custom, :alert
+ # depends_on :custom, class_prefix: true
+ # depends_on :custom, :alert, class_prefix: true
+ #
def depends_on(*stacks)
if stacks == []
@depends_on
else
@depends_on ||= []
- @depends_on += stacks
+ options = stacks.last.is_a?(Hash) ? stacks.pop : {}
+ stacks.each do |stack|
+ @depends_on << Jets::Stack::Depends::Item.new(stack, options)
+ end
end
end
# meth is a Symbol
def method_added(meth)