Method: Html2rss::AttributePostProcessors::Substring.validate_args!

Defined in:
lib/html2rss/attribute_post_processors/substring.rb

.validate_args!(value, context) ⇒ Object



32
33
34
35
36
37
38
39
40
# File 'lib/html2rss/attribute_post_processors/substring.rb', line 32

def self.validate_args!(value, context)
  assert_type value, String, :value, context:

  options = context[:options]
  assert_type options[:start], Integer, :start, context:

  end_index = options[:end]
  assert_type(end_index, Integer, :end, context:) if end_index
end