Module: DepsGrapher::Layer::Registry

Defined in:
lib/deps_grapher/layer/registry.rb

Class Method Summary collapse

Class Method Details

.allObject



20
21
22
# File 'lib/deps_grapher/layer/registry.rb', line 20

def all
  registry.values
end

.exist?(file_path) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/deps_grapher/layer/registry.rb', line 16

def exist?(file_path)
  registry.key? file_path
end

.fetch(file_path) ⇒ Object Also known as: []



7
8
9
# File 'lib/deps_grapher/layer/registry.rb', line 7

def fetch(file_path)
  registry[file_path] || Layer::Default
end

.register(file_path, layer) ⇒ Object



12
13
14
# File 'lib/deps_grapher/layer/registry.rb', line 12

def register(file_path, layer)
  registry[file_path] ||= layer
end