= RelatonOmg image:https://img.shields.io/gem/v/relaton-omg.svg["Gem Version", link="https://rubygems.org/gems/relaton-omg"] image:https://github.com/relaton/relaton-omg/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/relaton/relaton-omg/actions?workflow=macos"] image:https://github.com/relaton/relaton-omg/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/relaton/relaton-omg/actions?workflow=windows"] image:https://github.com/relaton/relaton-omg/workflows/ubuntu/badge.svg["Build Status (Ubuntu)", link="https://github.com/relaton/relaton-omg/actions?workflow=ubuntu"] image:https://codeclimate.com/github/relaton/relaton-omg/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/relaton/relaton-omg"] image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-omg.svg["Pull Requests", link="https://github.com/relaton/relaton-omg/pulls"] image:https://img.shields.io/github/commits-since/relaton/relaton-omg/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-omg/releases"] RelatonOmg is a Ruby gem that searches and fetches standards from https://www.omg.org[The Object Management Group (OMG)]. The standards scrape form https://www.omg.org/spec == Installation Add this line to your application's Gemfile: [source,ruby] ---- gem 'relaton-omg' ---- And then execute: $ bundle install Or install it yourself as: $ gem install relaton-omg == Usage === Search document Reference format is `OMG + {ACRONYM} + {VERSION}` - `ACRONYM` is an acronym from the list of specs https://www.omg.org/spec/#all - `VERSION` (optional) if omitted then the lastes version is fetched [source,ruby] ---- require 'relaton_omg' => true item = RelatonOmg::OmgBibliography.get 'OMG AMI4CCM 1.0' => # nil ---- === Serialization [source,ruby] ---- item.to_xml => " 2022-12-05 Asynchronous Method Invocation for CCM https://www.omg.org/spec/AMI4CCM/1.0/About-AMI4CCM https://www.omg.org/spec/AMI4CCM/1.0/PDF AMI4CCM 1.0 ... " ---- === Typed links OMG documents may have `src` and `pdf` link types. [source,ruby] ---- item.link => [#, @type="src">, #, @type="pdf">] ---- === Create bibliographic item from XML [source,ruby] ---- item = RelatonOmg::OmgBibliographicItem.from_xml 'spec/fixtures/omg_ami4ccm_1_0.xml' => # {"schema-version"=>"v1.2.1", "id"=>"AMI4CCM1.0", ... item = RelatonOmg::OmgBibliographicItem.from_hash hash => # #