Class: Pageflow::Chart::Scraper

Inherits:
Object
  • Object
show all
Defined in:
lib/pageflow/chart/scraper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html, options = {}) ⇒ Scraper

Returns a new instance of Scraper.



8
9
10
11
12
13
14
# File 'lib/pageflow/chart/scraper.rb', line 8

def initialize(html, options = {})
  @document = Nokogiri::HTML(html)
  @options = options

  parse
  rewrite
end

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



6
7
8
# File 'lib/pageflow/chart/scraper.rb', line 6

def document
  @document
end

#javascript_urlsObject (readonly)

Returns the value of attribute javascript_urls.



6
7
8
# File 'lib/pageflow/chart/scraper.rb', line 6

def javascript_urls
  @javascript_urls
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/pageflow/chart/scraper.rb', line 6

def options
  @options
end

#stylesheet_urlsObject (readonly)

Returns the value of attribute stylesheet_urls.



6
7
8
# File 'lib/pageflow/chart/scraper.rb', line 6

def stylesheet_urls
  @stylesheet_urls
end

Instance Method Details

#csv_urlObject



20
21
# File 'lib/pageflow/chart/scraper.rb', line 20

def csv_url
end

#htmlObject



16
17
18
# File 'lib/pageflow/chart/scraper.rb', line 16

def html
  document.to_s
end