lib/html2rss/attribute_post_processors/substring.rb in html2rss-0.7.0 vs lib/html2rss/attribute_post_processors/substring.rb in html2rss-0.8.0
- old
+ new
@@ -1,22 +1,28 @@
module Html2rss
module AttributePostProcessors
## Returns a defined part of a String.
#
+ # Both parameters must be an Integer and they can be negative.
# The +end+ parameter can be omitted, in that case it will not cut the
# String at the end.
#
+ # A Regexp or a MatchString is not supported.
+ #
+ # See the [`String#[]`](https://ruby-doc.org/core/String.html#method-i-5B-5D)
+ # documentation for more information.
+ #
# Imagine this HTML:
# <h1>Foo bar and baz<h1>
#
# YAML usage example:
# selectors:
# title:
# selector: h1
# post_process:
- # name: substring
- # start: 4
- # end: 6
+ # name: substring
+ # start: 4
+ # end: 6
#
# Would return:
# 'bar'
class Substring
def initialize(value, env)