Module: Jekyll::Filters::Numbers
- Defined in:
- lib/jekyll/filters/number.rb
Overview
Extracts numbers from a String, useful for converting phone numbers to tel: links.
Example usage:
<a href=“tel:page.tel | numbers }”>page.tel }</a>
Instance Method Summary collapse
Instance Method Details
#numbers(input) ⇒ Object
15 16 17 18 19 |
# File 'lib/jekyll/filters/number.rb', line 15 def numbers(input) return unless input.respond_to? :gsub input.gsub(/[^0-9]/, '') end |