Class: RelatonOgc::OgcBibliographicItem
- Inherits:
-
RelatonIsoBib::IsoBibliographicItem
- Object
- RelatonIsoBib::IsoBibliographicItem
- RelatonOgc::OgcBibliographicItem
- Defined in:
- lib/relaton_ogc/ogc_bibliographic_item.rb
Constant Summary collapse
- TYPES =
%w[ abstract-specification-topic best-practice change-request-supporting-document community-practice community-standard discussion-paper engineering-report other policy reference-model release-notes standard user-guide white-paper test-suite ].freeze
- SUBTYPES =
%w[ conceptual-model conceptual-model-and-encoding conceptual-model-and-implementation encoding extension implementation profile profile-with-extension general ].freeze
Instance Attribute Summary collapse
- #docsubtype ⇒ String readonly
Instance Method Summary collapse
-
#initialize(**args) ⇒ OgcBibliographicItem
constructor
A new instance of OgcBibliographicItem.
- #to_hash ⇒ Hash
Constructor Details
#initialize(**args) ⇒ OgcBibliographicItem
Returns a new instance of OgcBibliographicItem.
21 22 23 24 25 26 27 28 |
# File 'lib/relaton_ogc/ogc_bibliographic_item.rb', line 21 def initialize(**args) if args[:docsubtype] && !SUBTYPES.include?(args[:docsubtype]) warn "[relaton-ogc] invalid document subtype: #{args[:docsubtype]}" end @docsubtype = args.delete :docsubtype super end |
Instance Attribute Details
#docsubtype ⇒ String (readonly)
18 19 20 |
# File 'lib/relaton_ogc/ogc_bibliographic_item.rb', line 18 def docsubtype @docsubtype end |
Instance Method Details
#to_hash ⇒ Hash
31 32 33 34 35 |
# File 'lib/relaton_ogc/ogc_bibliographic_item.rb', line 31 def to_hash hash = super hash["docsubtype"] = docsubtype if docsubtype hash end |