Module: RuboCop::YAMLDuplicationChecker Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Defined in: | lib/rubocop/yaml_duplication_checker.rb |
Overview
Find duplicated keys from YAML.
Class Method Summary
- .check(yaml_string, filename, &on_duplicated) Internal use only
Class Method Details
.check(yaml_string, filename, &on_duplicated)
[ GitHub ]# File 'lib/rubocop/yaml_duplication_checker.rb', line 7
def self.check(yaml_string, filename, &on_duplicated) handler = DuplicationCheckHandler.new(&on_duplicated) parser = Psych::Parser.new(handler) parser.parse(yaml_string, filename) parser.handler.root.children[0] end