Skip to content

Commit

Permalink
move RFC parser to relaton-bib
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew2net committed Oct 14, 2021
1 parent fb442b3 commit c001a62
Show file tree
Hide file tree
Showing 28 changed files with 523 additions and 609 deletions.
1 change: 1 addition & 0 deletions lib/relaton_ietf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require "relaton_ietf/ietf_bibliographic_item"
require "relaton_ietf/xml_parser"
require "relaton_ietf/hash_converter"
require "relaton_ietf/committee"

require "relaton/provider_ietf"

Expand Down
8 changes: 8 additions & 0 deletions lib/relaton_ietf/committee.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module RelatonIetf
class Committee < RelatonBib::TechnicalCommittee
# @param builder [Nokogiri::XML::Builder]
def to_xml(builder)
builder.committee { |b| workgroup.to_xml b }
end
end
end
4 changes: 2 additions & 2 deletions lib/relaton_ietf/ietf_bibliographic_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def initialize(**args)
# @return [RelatonIetf::IetfBibliographicItem]
def self.from_hash(hash)
item_hash = ::RelatonIetf::HashConverter.hash_to_bib(hash)
new **item_hash
new(**item_hash)
end

# @param opts [Hash]
Expand All @@ -32,7 +32,7 @@ def self.from_hash(hash)
# @return [String] XML
def to_xml(**opts)
opts[:date_format] ||= :short
super **opts
super(**opts)
end
end
end
Loading

0 comments on commit c001a62

Please sign in to comment.