Class: LaMaquina::DependencyMap::YamlMap

Inherits:
Base
  • Object
show all
Defined in:
lib/la_maquina/dependency_map/yaml_map.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from LaMaquina::DependencyMap::Base

Instance Method Details

#find(*args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/la_maquina/dependency_map/yaml_map.rb', line 4

def find(*args)
  submap = map
  args.each do |key|
    submap = submap[key]
    if submap.blank?
      raise LaMaquina::Errors::InvalidMappingError.new("#{key} not found in #{args} in dependency map")
    end
  end
  submap
end