class RelatonIetf::IetfBibliographicItem
Constants
- DOCTYPES
Attributes
doctype[R]
@return [String, NilClass]
keyword[R]
@return [Array<String>]
Public Class Methods
from_hash(hash)
click to toggle source
@param hash [Hash] @return [RelatonIetf::IetfBibliographicItem]
# File lib/relaton_ietf/ietf_bibliographic_item.rb, line 22 def self.from_hash(hash) item_hash = ::RelatonIetf::HashConverter.hash_to_bib(hash) new **item_hash end
new(**args)
click to toggle source
@param doctype [String] @param keyword [Array<String>]
Calls superclass method
# File lib/relaton_ietf/ietf_bibliographic_item.rb, line 13 def initialize(**args) if args[:doctype] && !DOCTYPES.include?(args[:doctype]) warn "[relaton-ietf] WARNING: invalid doctype #{args[:doctype]}" end super end
Public Instance Methods
to_xml(**opts)
click to toggle source
@param opts [Hash] @option opts [Nokogiri::XML::Builder] :builder XML builder @option opts [Boolean] :bibdata @option opts [Symbol, NilClass] :date_format (:short), :full @option opts [String, Symbol] :lang language @return [String] XML
Calls superclass method
# File lib/relaton_ietf/ietf_bibliographic_item.rb, line 33 def to_xml(**opts) opts[:date_format] ||= :short super **opts end