Class: Metanorma::Iso::Sts::Transformer::IsoMetaTransformer
- Inherits:
-
Transformer::Base
- Object
- Transformer::Base
- Metanorma::Iso::Sts::Transformer::IsoMetaTransformer
- Includes:
- ContentText
- Defined in:
- lib/metanorma/iso/sts/transformer/iso_meta_transformer.rb
Constant Summary collapse
- DOC_TYPE_MAP =
{ "international-standard" => "IS", "technical-specification" => "TS", "technical-report" => "TR", "publicly-available-specification" => "PAS", "international-workshop-agreement" => "IWA", "guide" => "GUIDE", "amendment" => "Amd", "technical-corrigendum" => "TCor", "committee-document" => "CD", "recommendation" => "R", }.freeze
Instance Method Summary collapse
Methods included from ContentText
#extract_text, #extract_text_value
Instance Method Details
#transform(bibdata) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/metanorma/iso/sts/transformer/iso_meta_transformer.rb', line 22 def transform(bibdata) build_ordered(::Sts::IsoSts::IsoMeta) do |m| title_wraps_for(bibdata).each { |tw| m.title_wrap tw } m.doc_ident doc_ident_for(bibdata) m.std_ident std_ident_for(bibdata) std_refs_for(bibdata).each { |sr| m.std_ref sr } m.doc_ref doc_ref_for(bibdata) release_dates_for(bibdata).each { |rd| m.release_date rd } m.comm_ref comm_ref_for(bibdata) if (sec = secretariat_for(bibdata)) m.secretariat sec end ics_codes_for(bibdata).each { |i| m.ics i } (bibdata).each { |p| m. p } end end |