Class: IdsPlease::Parsers::Moikrug

Inherits:
Base
  • Object
show all
Defined in:
lib/ids_please/parsers/moikrug.rb

Constant Summary collapse

MASK =
/moikrug/i

Class Method Summary collapse

Methods inherited from Base

to_sym, valid_id_regex

Class Method Details

.interact(links) ⇒ Object



8
9
10
11
12
13
# File 'lib/ids_please/parsers/moikrug.rb', line 8

def interact(links)
  links.map do |link|
    next if link.host.sub('.moikrug.ru', '') == link.host
    parse_link(link)
  end.compact
end


15
16
17
# File 'lib/ids_please/parsers/moikrug.rb', line 15

def parse_link(link)
  link.host.sub('.moikrug.ru', '')
end