Class: IdsPlease::Parsers::GooglePlus
- Defined in:
- lib/ids_please/parsers/google_plus.rb
Constant Summary collapse
- MASK =
/google/i
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.interact(links) ⇒ Object
12 13 14 |
# File 'lib/ids_please/parsers/google_plus.rb', line 12 def interact(links) links.map { |l| parse_link(l) }.compact end |
.parse_link(link) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/ids_please/parsers/google_plus.rb', line 16 def parse_link(link) if matched = link.path.match(/\/(\+\w+)/) matched[1] elsif matched = link.path.match(/\/(\d{2,})/) matched[1] end end |
.to_sym ⇒ Object
8 9 10 |
# File 'lib/ids_please/parsers/google_plus.rb', line 8 def to_sym :google_plus end |