Class: ODDB::VaccineIndexWriter

Inherits:
NullWriter show all
Defined in:
src/plugin/vaccines.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from NullWriter

#new_fonthandler, #new_tablehandler, #send_image, #send_meta

Instance Attribute Details

- (Object) path (readonly)

Returns the value of attribute path



15
16
17
# File 'src/plugin/vaccines.rb', line 15

def path
  @path
end

Instance Method Details

- (Object) new_linkhandler(link)



22
23
24
25
26
# File 'src/plugin/vaccines.rb', line 22

def new_linkhandler(link)
  if(link && (href = link.attribute('href')) && /.*\.xls$/u.match(href))
    @candidate = href.gsub /&/u, '&'
  end
end

- (Object) send_flowing_data(data)



16
17
18
19
20
21
# File 'src/plugin/vaccines.rb', line 16

def send_flowing_data(data)
  if(/Excel|xls/iu.match data)
    @path ||= @candidate
  end
  super
end