lib/html2rss/attribute_post_processors/substring.rb in html2rss-0.12.0 vs lib/html2rss/attribute_post_processors/substring.rb in html2rss-0.13.0
- old
+ new
@@ -28,16 +28,16 @@
#
# Would return:
# 'bar'
class Substring < Base
def self.validate_args!(value, context)
- assert_type value, String, :value
+ assert_type value, String, :value, context:
options = context[:options]
- assert_type options[:start], Integer, :start
+ assert_type options[:start], Integer, :start, context:
end_index = options[:end]
- assert_type end_index, Integer, :end if end_index
+ assert_type(end_index, Integer, :end, context:) if end_index
end
##
# Extracts the substring from the original string based on the provided start and end indices.
#