Method: CloudBuilder::Resource#initialize
- Defined in:
- lib/cloud_builder/resource.rb
#initialize(stack, name, &block) ⇒ Resource
Returns a new instance of Resource.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cloud_builder/resource.rb', line 6 def initialize(stack, name, &block) @stack = stack @type = nil @properties = {} = {} @block = block @deletion_policy = nil @update_policy = nil @depends_on = nil # add metadata describing the brick we were defined in if @block.binding.eval('@type') do brick_name @block.binding.eval('@type') end end instance_eval(&block) end |