8000 GitHub - relaton/relaton-core
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

relaton/relaton-core

Repository files navigation

Library for importing and caching bibliographic references to technical standards library

Usage

Exclude attributes when compare

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

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

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0