Module: Metanorma::Compile::Validator
- Included in:
- Metanorma::Compile
- Defined in:
- lib/metanorma/compile/validator.rb
Instance Method Summary collapse
- #validate_format!(options) ⇒ Object
- #validate_options!(options) ⇒ Object
- #validate_type!(options) ⇒ Object
Instance Method Details
#validate_format!(options) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/metanorma/compile/validator.rb', line 20 def validate_format!() unless [:format] == :asciidoc Util.log("[metanorma] Error: Only source file format currently "\ "supported is 'asciidoc'.", :fatal) end end |
#validate_options!(options) ⇒ Object
6 7 8 9 |
# File 'lib/metanorma/compile/validator.rb', line 6 def () validate_type!() validate_format!() end |
#validate_type!(options) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/metanorma/compile/validator.rb', line 11 def validate_type!() unless [:type] Util.log("[metanorma] Error: Please specify a standard type: "\ "#{@registry.supported_backends}.", :fatal) end stdtype = [:type].to_sym load_flavor(stdtype) end |