Module: Humidifier::Loader
- Defined in:
- lib/humidifier/loader.rb
Overview
Reads the specs/CloudFormationResourceSpecification.json file and load each resource as a class
Defined Under Namespace
Classes: PropertyTypes
Class Method Summary collapse
-
.load ⇒ Object
loop through the specs and register each class.
Class Method Details
.load ⇒ Object
loop through the specs and register each class
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/humidifier/loader.rb', line 32 def load parsed = parse_spec types = PropertyTypes.new(parsed['PropertyTypes']) parsed['ResourceTypes'].each do |key, spec| match = key.match(/\A(\w+)::(\w+)::(\w+)\z/) register(match[1], match[2], match[3], spec, types.search(key)) end Humidifier.registry.freeze end |