Class: GenomerPluginValidate::Validator::DuplicateID

Inherits:
Genomer::Plugin
  • Object
show all
Includes:
GenomerPluginValidate::Validator
Defined in:
lib/genomer-plugin-validate/validator/duplicate_id.rb

Instance Method Summary collapse

Methods included from GenomerPluginValidate::Validator

#annotations_by_attribute, load, validators

Instance Method Details

#runObject



4
5
6
7
8
9
# File 'lib/genomer-plugin-validate/validator/duplicate_id.rb', line 4

def run
  annotations_by_attribute('ID').
    select{|_,v| v.length > 1}.
    select{|k,_| ! k.nil? }.
    map{|(id,_)| "Duplicate ID '#{id}'" }
end