Sha256: 875f7c3914b75214836fc5f47e7ddc29f39cc74ba049aab6400215ab1e64e50a

Contents?: true

Size: 384 Bytes

Versions: 2

Compression:

Stored size: 384 Bytes

Contents

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

  def run
    no_product = annotations_by_attribute('product')[nil].map(&:id)
    no_name    = annotations_by_attribute('Name')[nil].map(&:id)

    (no_name & no_product).map do |id|
      "No 'Name' or 'product' attribute for annotation '#{id}'"
    end
  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/no_name_or_product.rb
genomer-plugin-validate-0.0.1 lib/genomer-plugin-validate/validator/no_name_or_product.rb