metanorma / pubid-iso

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

Must accept year for Amendments and Corrigendum #79

Closed ronaldtse closed 2 years ago

ronaldtse commented 2 years ago
irb(main):012:0> Pubid::Iso::Identifier.new(number: 17301, part: 1, publisher: "ISO", language: "en", year: 2016, amendments: [{number: 1, stage: "NP",
 year: 2017}]).to_s
gems/pubid-core-0.2.2/lib/pubid/core/supplement.rb:6:in `initialize': unknown keyword: :year (ArgumentError)                                                                                                                                     
        from gems/pubid-iso-0.1.10/lib/pubid/iso/supplement.rb:6:in `initialize'          
        from gems/pubid-core-0.2.2/lib/pubid/core/identifier.rb:11:in `new'               
        from gems/pubid-core-0.2.2/lib/pubid/core/identifier.rb:11:in `block in initialize'                                                                                                                                                      
        from gems/pubid-core-0.2.2/lib/pubid/core/identifier.rb:10:in `map'
        from gems/pubid-core-0.2.2/lib/pubid/core/identifier.rb:10:in `initialize'
    from gems/pubid-iso-0.1.10/lib/pubid/iso/identifier.rb:10:in `initialize'

The output should be: "ISO 17301-1:2016/NP Amd 1:2017"