Class: UrlParser
- Inherits:
-
Object
- Object
- UrlParser
- Defined in:
- lib/ramparts/parsers/url_parser.rb
Overview
Parses text and attempts to find urls
Instance Method Summary collapse
-
#count_url_instances(text, options) ⇒ Object
Counts the number of occurrences of that url within the block of text.
Instance Method Details
#count_url_instances(text, options) ⇒ Object
Counts the number of occurrences of that url within the block of text
8 9 10 11 12 13 |
# File 'lib/ramparts/parsers/url_parser.rb', line 8 def count_url_instances(text, ) raise ArgumentError, ARGUMENT_ERROR_TEXT unless text.is_a? String text = parse_url(text) url_instances(text, ).length end |