Class: Pubid::Iso::Identifier::InternationalStandard
- Inherits:
-
Base
- Object
- Core::Identifier::Base
- Base
- Pubid::Iso::Identifier::InternationalStandard
- Defined in:
- lib/pubid/iso/identifier/international_standard.rb
Constant Summary collapse
- TYPED_STAGES =
{ dp: { abbr: "DP", name: "Draft Proposal", harmonized_stages: %w[], }, dis: { abbr: "DIS", name: "Draft International Standard", harmonized_stages: %w[40.00 40.20 40.60 40.92 40.93 40.98 40.99], }, fdis: { abbr: "FDIS", name: "Final Draft International Standard", harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99], }, }.freeze
Instance Attribute Summary
Attributes inherited from Base
#addendum, #base, #dirtype, #iteration, #joint_document, #scnumber, #sctype, #stage, #supplement, #supplements, #tcnumber, #tctype, #typed_stage, #wgnumber, #wgtype
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(publisher: "ISO", number: nil, stage: nil, iteration: nil, supplement: nil, joint_document: nil, tctype: nil, sctype: nil, wgtype: nil, tcnumber: nil, scnumber: nil, wgnumber: nil, dir: nil, dirtype: nil, year: nil, amendments: nil, corrigendums: nil, type: nil, base: nil, supplements: nil, **opts) ⇒ InternationalStandard
constructor
A new instance of InternationalStandard.
- #typed_stage_abbrev ⇒ Object
Methods inherited from Base
#find_typed_stage, get_amendment_class, get_corrigendum_class, #get_params, get_parser_class, get_renderer_class, get_transformer_class, get_update_codes, has_typed_stage?, #render_joint_document, #resolve_format, #resolve_typed_stage, #root, supplement_by_type, supplements_has_type?, #to_s, transform, transform_supplements, type_match?, #typed_stage_name, #urn
Constructor Details
#initialize(publisher: "ISO", number: nil, stage: nil, iteration: nil, supplement: nil, joint_document: nil, tctype: nil, sctype: nil, wgtype: nil, tcnumber: nil, scnumber: nil, wgnumber: nil, dir: nil, dirtype: nil, year: nil, amendments: nil, corrigendums: nil, type: nil, base: nil, supplements: nil, **opts) ⇒ InternationalStandard
Returns a new instance of InternationalStandard.
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/pubid/iso/identifier/international_standard.rb', line 24 def initialize(publisher: "ISO", number: nil, stage: nil, iteration: nil, supplement: nil, joint_document: nil, tctype: nil, sctype: nil, wgtype: nil, tcnumber: nil, scnumber: nil, wgnumber:nil, dir: nil, dirtype: nil, year: nil, amendments: nil, corrigendums: nil, type: nil, base: nil, supplements: nil, **opts) if iteration && stage.nil? raise Errors::IsStageIterationError, "IS stage document cannot have iteration" end super end |
Class Method Details
.type ⇒ Object
45 46 47 |
# File 'lib/pubid/iso/identifier/international_standard.rb', line 45 def self.type { key: :is, title: "International Standard" } end |
Instance Method Details
#typed_stage_abbrev ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/pubid/iso/identifier/international_standard.rb', line 37 def typed_stage_abbrev if self.class::TYPED_STAGES.key?(typed_stage) super else stage&.abbr end end |