Class: VisaCheck::Reader
- Inherits:
-
Object
- Object
- VisaCheck::Reader
- Defined in:
- lib/visa_check/reader.rb
Overview
VisaCheck::Reader retrieves an online PDF from the consulate and extracts visa application numbers.
Constant Summary collapse
- HOST =
'm.germania.diplo.de'- PAGE =
'http://m.germania.diplo.de/Vertretung/russland/de/02-mosk/1-visa/3-nationale-visa/0-nationale-visa.html?r'- SOURCE =
'http://m.germania.diplo.de/contentblob/4048654/Daten/4377008/1entschiedenevisumantraege.pdf'- USER_AGENT =
'Mozilla/5.0 (Android; Mobile; rv:13.0) Gecko/13.0 Firefox/13.0'
Class Method Summary collapse
-
.applications ⇒ Object
Fetch a list of application numbers contained in the published document.
Class Method Details
.applications ⇒ Object
Fetch a list of application numbers contained in the published document
17 18 19 |
# File 'lib/visa_check/reader.rb', line 17 def self.applications pdf_reader.pages.map { |page| page.text.scan /^(\d{7})\s+/ }.flatten end |