class Humidifier::Loader::PropertyTypes
Handles searching the PropertyTypes
specifications for a specific resource type
Attributes
structs[R]
Public Class Methods
new(structs)
click to toggle source
# File lib/humidifier/loader.rb, line 12 def initialize(structs) @structs = structs end
Public Instance Methods
search(key)
click to toggle source
find the substructures necessary for the given resource key
# File lib/humidifier/loader.rb, line 17 def search(key) results = structs.keys.grep(/#{key}/) shortened_names = results.map { |result| result.gsub("#{key}.", '') } shortened_names.zip(structs.values_at(*results)).to_h.merge(global) end
Private Instance Methods
global()
click to toggle source
# File lib/humidifier/loader.rb, line 25 def global @global ||= structs.reject { |key, _| key.match(/AWS/) } end