class AnyStyle::Normalizer::Publisher

Public Instance Methods

normalize(item, **opts) click to toggle source
  # File lib/anystyle/normalizer/publisher.rb
6 def normalize(item, **opts)
7   replace_author(item) if item.key?(:author)
8   item
9 end
replace_author(item) click to toggle source
   # File lib/anystyle/normalizer/publisher.rb
11 def replace_author(item)
12   each_value(item) do |_, value|
13     value.gsub!(/^Author$/, item[:author][0])
14   end
15 end