Class: IdsPlease::BaseParser

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

Class Method Summary collapse

Class Method Details

.parse(links) ⇒ Object



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

def self.parse(links)
  links.map do |l|
    id = parse_link(l)
    matched_id = id.match(valid_id_regex) if id
    matched_id[1] if matched_id
  end.compact
end

.to_symObject



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

def self.to_sym
  self.name.split('::').last.downcase.to_sym
end