Sha256: 0161ac71e8ad2417519d171b7337b04a318541727e5148be0cd481041ef863d1

Contents?: true

Size: 380 Bytes

Versions: 2

Compression:

Stored size: 380 Bytes

Contents

class GenomerPluginValidate::Validator::UppercaseName < Genomer::Plugin
  include GenomerPluginValidate::Validator

  def run
    annotations_by_attribute('Name').
      select{|(name,_)| name =~ /^[A-Z]/}.
      map{|(_,entry)| entry}.
      flatten.
      map{|i| [i.get_attribute('Name'),i.id]}.
      map{|i| "Illegal capitalised Name attribute '%s' for '%s'" % i}
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
genomer-plugin-validate-0.0.2 lib/genomer-plugin-validate/validator/uppercase_name.rb
genomer-plugin-validate-0.0.1 lib/genomer-plugin-validate/validator/uppercase_name.rb