Sha256: 652e0734d60dbe9aea7768ae03685cf6330c9788cddcaf162589e296a1cd6bf8
Contents?: true
Size: 988 Bytes
Versions: 2
Compression:
Stored size: 988 Bytes
Contents
module Metanorma module Standoc module Blocks def reqt_subpart?(name) @reqt_model&.reqt_subpart?(name) end def requirement_subpart(node) @reqt_model.requirement_subpart(node, keep_attrs(node)) end def default_requirement_model :default end def select_requirement_model(node) return if @reqt_model @reqt_model_name = node.attr("model") || @default_requirement_model @reqt_model = @reqt_models.model(@reqt_model_name) end def requirement(node, obligation, type) nested = @reqt_model !node.attr("type") && !%w(requirement recommendation permission).include?(type) and node.set_attr("type", type) attrs = keep_attrs(node).merge(id_unnum_attrs(node)) .merge(model: @reqt_model_name) ret = @reqt_model.requirement(node, obligation, attrs) @reqt_model = nil unless nested ret end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
metanorma-standoc-2.2.1.1 | lib/metanorma/standoc/reqt.rb |
metanorma-standoc-2.2.1 | lib/metanorma/standoc/reqt.rb |