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: Compiler

Class Method Summary collapse

Class Method Details

.loadObject

loop through the specs and register each class



127
128
129
130
131
132
# File 'lib/humidifier/loader.rb', line 127

def self.load
  filepath = File.expand_path("../../#{SPECIFICATION}", __dir__)
  return unless File.file?(filepath)

  Compiler.new(JSON.parse(File.read(filepath))).compile
end