Module: Humidifier

Defined in:
lib/humidifier.rb,
lib/humidifier/fn.rb,
lib/humidifier/cli.rb,
lib/humidifier/ref.rb,
lib/humidifier/props.rb,
lib/humidifier/stack.rb,
lib/humidifier/config.rb,
lib/humidifier/loader.rb,
lib/humidifier/output.rb,
lib/humidifier/mapping.rb,
lib/humidifier/version.rb,
lib/humidifier/resource.rb,
lib/humidifier/condition.rb,
lib/humidifier/directory.rb,
lib/humidifier/parameter.rb,
lib/humidifier/serializer.rb,
lib/humidifier/config/mapper.rb,
lib/humidifier/config/mapping.rb

Overview

container module for all gem classes

Defined Under Namespace

Modules: Loader, Props Classes: CLI, Condition, Config, Directory, Error, Fn, Mapping, Output, Parameter, Ref, Resource, Serializer, Stack

Constant Summary collapse

VERSION =
'3.5.0'

Class Method Summary collapse

Class Method Details

.[](aws_name) ⇒ Object

convenience method for finding classes by AWS name


55
56
57
# File 'lib/humidifier.rb', line 55

def [](aws_name)
  registry[aws_name]
end

.configObject

the configuration instance


30
31
32
# File 'lib/humidifier.rb', line 30

def config
  @config ||= Config.new
end

.configure {|config| ... } ⇒ Object

yield the config object to the block for setting user params

Yields:


35
36
37
# File 'lib/humidifier.rb', line 35

def configure
  yield config
end

.fnObject

convenience method for calling cloudformation functions


40
41
42
# File 'lib/humidifier.rb', line 40

def fn
  Fn
end

.ref(reference) ⇒ Object

convenience method for creating references


45
46
47
# File 'lib/humidifier.rb', line 45

def ref(reference)
  Ref.new(reference)
end

.registryObject

the list of all registered resources


50
51
52
# File 'lib/humidifier.rb', line 50

def registry
  @registry ||= {}
end

.underscore(names) ⇒ Object

a frozen hash of the given names mapped to their underscored version


60
61
62
# File 'lib/humidifier.rb', line 60

def underscore(names)
  names.map { |name| [name, name.underscore.to_sym] }.to_h.freeze
end