lib/html2rss/attribute_post_processors/substring.rb in html2rss-0.3.2 vs lib/html2rss/attribute_post_processors/substring.rb in html2rss-0.3.3
- old
+ new
@@ -5,10 +5,10 @@
@value = value
@options = options
end
def get
- ending = @options['end'].to_i.positive? ? @options['end'].to_i : @value.length
+ ending = @options.fetch('end', false) ? @options['end'].to_i : @value.length
@value[@options['start'].to_i..ending]
end
end
end
end