Skip to content

Commit

Permalink
use flavor's child Stage class
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew2net committed Jul 26, 2022
1 parent daa8b86 commit dffbfb0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/relaton_bib/document_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def to_asciibib(prefix = "")
def stage_new(stg)
case stg
when Stage then stg
when Hash then Stage.new(**stg)
when String then Stage.new(value: stg)
when Hash then self.class::Stage.new(**stg)
when String then self.class::Stage.new(value: stg)
end
end

Expand Down
6 changes: 2 additions & 4 deletions lib/relaton_bib/technical_committee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ def initialize(workgroup)

# @param builder [Nokogiri::XML::Builder]
def to_xml(builder)
builder.send "technical-committee" do |b|
workgroup.to_xml b
end
builder.send(:"technical-committee") { |b| workgroup.to_xml b }
end

# @return [Hash]
Expand All @@ -26,7 +24,7 @@ def to_hash
# @param count [Integer] number of technical committees
# @return [String]
def to_asciibib(prefix = "", count = 1)
pref = prefix.empty? ? prefix : prefix + "."
pref = prefix.empty? ? prefix : "#{prefix}."
pref += "technical_committee"
out = count > 1 ? "#{pref}::\n" : ""
out += workgroup.to_asciibib pref
Expand Down
2 changes: 1 addition & 1 deletion lib/relaton_bib/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RelatonBib
VERSION = "1.12.2".freeze
VERSION = "1.12.3".freeze
end

0 comments on commit dffbfb0

Please sign in to comment.