Class: RelatonIetf::IetfBibliographicItem
- Inherits:
-
RelatonBib::BibliographicItem
- Object
- RelatonBib::BibliographicItem
- RelatonIetf::IetfBibliographicItem
- Defined in:
- lib/relaton_ietf/ietf_bibliographic_item.rb
Instance Attribute Summary collapse
- #doctype ⇒ String, NilClass readonly
- #keyword ⇒ Array<String> readonly
Instance Method Summary collapse
-
#initialize(**args) ⇒ IetfBibliographicItem
constructor
A new instance of IetfBibliographicItem.
- #to_xml(builder = nil, **opts) ⇒ Object
Constructor Details
#initialize(**args) ⇒ IetfBibliographicItem
Returns a new instance of IetfBibliographicItem.
11 12 13 14 15 |
# File 'lib/relaton_ietf/ietf_bibliographic_item.rb', line 11 def initialize(**args) @doctype = args.delete :doctype @keyword = args.delete(:keyword) || [] super end |
Instance Attribute Details
#doctype ⇒ String, NilClass (readonly)
4 5 6 |
# File 'lib/relaton_ietf/ietf_bibliographic_item.rb', line 4 def doctype @doctype end |
#keyword ⇒ Array<String> (readonly)
7 8 9 |
# File 'lib/relaton_ietf/ietf_bibliographic_item.rb', line 7 def keyword @keyword end |
Instance Method Details
#to_xml(builder = nil, **opts) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/relaton_ietf/ietf_bibliographic_item.rb', line 20 def to_xml(builder = nil, **opts) opts[:date_format] ||= :short super builder, **opts do |b| if opts[:bibdata] b.ext do b.doctype doctype if doctype keyword.each { |k| b.keyword k } end end end end |