Class: Resource

Inherits:
Object
  • Object
show all
Includes:
CfnParser
Defined in:
lib/resource.rb

Constant Summary collapse

ATTRIBUTES =
[
  :deletion_policy,
  :depends_on,
  :metadata,
  :update_policy,
  :condition,
  :type,
  :properties,
  :creation_policy
]

Instance Method Summary collapse

Methods included from CfnParser

#array, #hash, #intrinsic_function, #intrinsic_function?, #parse_cfn_json, #primitive

Constructor Details

#initialize(name, json) ⇒ Resource

Returns a new instance of Resource.



17
18
19
20
21
22
# File 'lib/resource.rb', line 17

def initialize(name, json)
  @name = name
  ATTRIBUTES.each do |a|
    send(attribute_type(a), json, a.to_s)
  end
end