Class: IvaSearch::Tax
- Inherits:
-
Object
- Object
- IvaSearch::Tax
- Defined in:
- lib/iva_gem/iva_gem.rb
Constant Summary collapse
- URL_HACIENDA =
'http://www.mh.gob.sv/portal/page/portal/PMH/Novedades/Calendario'
- CALENDAR =
"//div[@class = 'ct-calendar-content']/h3"
Class Method Summary collapse
Class Method Details
.get_calendar(page) ⇒ Object
19 20 21 22 |
# File 'lib/iva_gem/iva_gem.rb', line 19 def self.get_calendar(page) calendar = page.xpath(CALENDAR) item = calendar.map { |t| t.text} end |
.getDates ⇒ Object
9 10 11 12 13 |
# File 'lib/iva_gem/iva_gem.rb', line 9 def self.getDates() doc = getHtml() calendar = get_calendar(doc) end |
.getHtml ⇒ Object
15 16 17 |
# File 'lib/iva_gem/iva_gem.rb', line 15 def self.getHtml() Nokogiri::HTML(open(URL_HACIENDA)) end |