Module: Fusuma::Config::YAMLDuplicationChecker

Defined in:
lib/fusuma/config/yaml_duplication_checker.rb

Overview

Class Method Summary collapse

Class Method Details

.check(yaml_string, filename, &on_duplicated) ⇒ Object

: (String, String) { (string) -> void } -> void



12
13
14
15
16
17
# File 'lib/fusuma/config/yaml_duplication_checker.rb', line 12

def self.check(yaml_string, filename, &on_duplicated)
  tree = YAML.parse(yaml_string, filename: filename)
  return unless tree

  traverse(tree, &on_duplicated)
end