lib/html2rss/attribute_post_processors/gsub.rb in html2rss-0.8.1 vs lib/html2rss/attribute_post_processors/gsub.rb in html2rss-0.8.2
- old
+ new
@@ -25,11 +25,12 @@
#
# 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']
- @replacement = env[:options]['replacement']
+ options = env[:options]
+ @pattern = options[:pattern].to_regexp || options[:pattern]
+ @replacement = options[:replacement]
end
##
# @return [String]
def get