Sha256: a4325849010c944f551ebb757c073c2d5073463af952a3c339266271af14d58d
Contents?: true
Size: 847 Bytes
Versions: 2
Compression:
Stored size: 847 Bytes
Contents
= Library for importing and caching bibliographic references to technical standards library == Usage === Exclude attributes when compare [source,ruby] ---- require "relaton-core" pubid_first = Identifier.parse("ISO 1:1999") pubid_second = Identifier.parse("ISO 1") pubid_first == pubid_second => false pubid_first.exclude(:year) == pubid_second => true ---- === Using #to_h to convert identifier to hash [source,ruby] ---- require "pubid-core" pubid = Identifier.parse("ISO 1:1999") pubid.to_h => { publisher: "ISO", number: 1, year: 1999 } ---- === Using #new_edition_of? to compare identifiers [source,ruby] ---- require "pubid-core" pubid_first = Identifier.parse("ISO 1:1999") pubid_second = Identifier.parse("ISO 1:2000") pubid_first.new_edition_of?(pubid_second) => false pubid_second.new_edition_of?(pubid_first) => true ----
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
relaton-core-0.0.3 | README.adoc |
relaton-core-0.0.2 | README.adoc |