Module: Pubid::Iec::Identifier

Extended by:
Core::Identifier
Defined in:
lib/pubid/iec/identifier.rb,
lib/pubid/iec/identifier/guide.rb,
lib/pubid/iec/identifier/amendment.rb,
lib/pubid/iec/identifier/supplement.rb,
lib/pubid/iec/identifier/corrigendum.rb,
lib/pubid/iec/identifier/white_paper.rb,
lib/pubid/iec/identifier/technical_report.rb,
lib/pubid/iec/identifier/test_report_form.rb,
lib/pubid/iec/identifier/working_document.rb,
lib/pubid/iec/identifier/technology_report.rb,
lib/pubid/iec/identifier/interpretation_sheet.rb,
lib/pubid/iec/identifier/operational_document.rb,
lib/pubid/iec/identifier/conformity_assessment.rb,
lib/pubid/iec/identifier/international_standard.rb,
lib/pubid/iec/identifier/component_specification.rb,
lib/pubid/iec/identifier/technical_specification.rb,
lib/pubid/iec/identifier/systems_reference_document.rb,
lib/pubid/iec/identifier/publicly_available_specification.rb,
lib/pubid/iec/identifier/societal_technology_trend_report.rb,
lib/pubid/iec/identifier/technology_and_market_outlook_paper.rb

Defined Under Namespace

Classes: Amendment, ComponentSpecification, ConformityAssessment, Corrigendum, Guide, InternationalStandard, InterpretationSheet, OperationalDocument, PubliclyAvailableSpecification, SocietalTechnologyTrendReport, Supplement, SystemsReferenceDocument, TechnicalReport, TechnicalSpecification, TechnologyAndMarketOutlookPaper, TechnologyReport, TestReportForm, WorkingDocument, WritePaper

Constant Summary collapse

IEV_SHORTHAND =
/\AIEV(?=\z|[\s\-])/.freeze

Class Method Summary collapse

Class Method Details

.build_project_stage(**args) ⇒ Object



22
23
24
# File 'lib/pubid/iec/identifier.rb', line 22

def build_project_stage(**args)
  TypedProjectStage.new(config: @config, **args)
end

.parse(*args) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/pubid/iec/identifier.rb', line 8

def parse(*args)
  if args[0].is_a?(String) && args[0].match?(IEV_SHORTHAND)
    args = args.dup
    args[0] = args[0].sub(IEV_SHORTHAND, "IEC 60050")
  end
  Base.parse(*args)
end

.parseable?(pubid) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
20
# File 'lib/pubid/iec/identifier.rb', line 16

def parseable?(pubid)
  return true if pubid.is_a?(String) && pubid.match?(IEV_SHORTHAND)

  super
end