Class: GenomerPluginValidate::Validator::ViewAttributes
- Inherits:
-
Genomer::Plugin
- Object
- Genomer::Plugin
- GenomerPluginValidate::Validator::ViewAttributes
- Defined in:
- lib/genomer-plugin-validate/validator/view_attributes.rb
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/genomer-plugin-validate/validator/view_attributes.rb', line 7 def run annotations. map{|attn| attn.attributes.map{|(k,v)| [k,attn] }}. flatten(1). select{|(term,_)| term =~ (/^[a-z]/) }. reject{|(term,_)| valid_view_attributes.include? term }. map{|(term,attn)| "Illegal view attribute '#{term}' for '#{attn.id}'"} end |
#valid_view_attributes ⇒ Object
3 4 5 |
# File 'lib/genomer-plugin-validate/validator/view_attributes.rb', line 3 def valid_view_attributes %w|product ec_number function feature_type| end |