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
19 20 21 22 23 |
# File 'lib/metanorma/compile/validator.rb', line 19 def validate_format!() [:format] == :asciidoc or Util.log("[metanorma] Error: Only source file format currently "\ "supported is 'asciidoc'.", :fatal) 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 |
# File 'lib/metanorma/compile/validator.rb', line 11 def validate_type!() [:type] or Util.log("[metanorma] Error: Please specify a standard type: "\ "#{@registry.supported_backends}.", :fatal) stdtype = [:type].to_sym load_flavor(stdtype) end |