Class: GenomerPluginValidate::Validator::NoNameOrProduct
- Inherits:
-
Genomer::Plugin
- Object
- Genomer::Plugin
- GenomerPluginValidate::Validator::NoNameOrProduct
- Includes:
- GenomerPluginValidate::Validator
- Defined in:
- lib/genomer-plugin-validate/validator/no_name_or_product.rb
Instance Method Summary collapse
Methods included from GenomerPluginValidate::Validator
#annotations_by_attribute, load, validators
Instance Method Details
#run ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/genomer-plugin-validate/validator/no_name_or_product.rb', line 4 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 |