Class: IdsPlease::Parsers::Livejournal

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

Constant Summary collapse

MASK =
/livejournal/i

Class Method Summary collapse

Methods inherited from Base

interact, to_sym, valid_id_regex

Class Method Details



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

def parse_link(link)
  parsed = link.host.sub('.livejournal.com', '')
  parsed = link.host.split('.livejournal').first if parsed == link.host
  return if parsed == link.host
  parsed
end