Class: Glossarist::Validation::Rules::ConceptUriRule
- Defined in:
- lib/glossarist/validation/rules/concept_uri_rule.rb
Instance Method Summary collapse
- #applicable?(context) ⇒ Boolean
- #category ⇒ Object
- #check(context) ⇒ Object
- #code ⇒ Object
- #scope ⇒ Object
- #severity ⇒ Object
Methods inherited from Base
Instance Method Details
#applicable?(context) ⇒ Boolean
12 13 14 |
# File 'lib/glossarist/validation/rules/concept_uri_rule.rb', line 12 def applicable?(context) context.gcr? && context. end |
#category ⇒ Object
8 |
# File 'lib/glossarist/validation/rules/concept_uri_rule.rb', line 8 def category = :structure |
#check(context) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/glossarist/validation/rules/concept_uri_rule.rb', line 16 def check(context) = context. return [] if .uri_prefix && !.uri_prefix.strip.empty? [issue( "no concept URI prefix or template defined in metadata", code: code, severity: severity, location: "metadata.yaml", suggestion: "Add uri_prefix or concept_uri_template to metadata.yaml", )] end |
#code ⇒ Object
7 |
# File 'lib/glossarist/validation/rules/concept_uri_rule.rb', line 7 def code = "GLS-014" |
#scope ⇒ Object
10 |
# File 'lib/glossarist/validation/rules/concept_uri_rule.rb', line 10 def scope = :collection |
#severity ⇒ Object
9 |
# File 'lib/glossarist/validation/rules/concept_uri_rule.rb', line 9 def severity = "warning" |