metanorma / pubid-iso

Implementation of ISO pubid
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

#typed_stage_abbrev raises an error for normal stages (not typed) #167

Closed mico closed 1 year ago

mico commented 1 year ago

Example from current documentation is failing:

0> pubid = Pubid::Iso::Identifier::Base.parse("ISO/WD TR 26000:2010")
=> #<Pubid::Iso::Identifier::TechnicalReport:0x00007ffc10a47770 @publisher="ISO", @number="26000"@10, @year=2010, @typed_stage=nil, @stage=#<Pubid::Iso::Stage:0x00007ffc10a47630 @abbr="WD", @harmonized_code=#<Pubid::Iso::HarmonizedStageCode:0x00007ffc10a475e0 @stages=["20.20", "20.60", "20.98", "20.99"]>>>

0> pubid.typed_stage_abbrev
=> undefined method `[]' for nil:NilClass

0> pubid.typed_stage_name
=> undefined method `[]' for nil:NilClass