lib/html2rss/attribute_post_processors/gsub.rb in html2rss-0.7.0 vs lib/html2rss/attribute_post_processors/gsub.rb in html2rss-0.8.0

- old
+ new

@@ -10,18 +10,20 @@ # YAML usage example: # selectors: # title: # selector: h1 # post_process: - # name: gsub - # pattern: boo - # replacement: baz + # name: gsub + # pattern: boo + # replacement: baz # # Would return: # 'Foo bar and baz' # # `pattern` can be a Regexp or a String. + # # `replacement` can be a String or a Hash. + # # See the doc on [String#gsub](https://ruby-doc.org/core/String.html#method-i-gsub) for more info. class Gsub def initialize(value, env) @value = value @pattern = env[:options]['pattern'].to_regexp || env[:options]['pattern']