Class: IdsPlease::BaseParser

Inherits:
Object
  • Object
show all
Defined in:
lib/ids_please/base_parser.rb

Class Method Summary collapse

Class Method Details

.network_nameObject



3
4
5
# File 'lib/ids_please/base_parser.rb', line 3

def self.network_name
  self.name.split('::').last
end

.parse(links) ⇒ Object



7
8
9
# File 'lib/ids_please/base_parser.rb', line 7

def self.parse(links)
  links.map { |l| parse_link(l) }.compact
end


11
12
13
# File 'lib/ids_please/base_parser.rb', line 11

def self.parse_link(link)
  link.path.split('/')[1]
end