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.



12
13
14
15
16
17
18
# File 'lib/pageflow/chart/scraper.rb', line 12

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_urls_in_bodyObject (readonly)

Returns the value of attribute javascript_urls_in_body.



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

def javascript_urls_in_body
  @javascript_urls_in_body
end

#javascript_urls_in_headObject (readonly)

Returns the value of attribute javascript_urls_in_head.



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

def javascript_urls_in_head
  @javascript_urls_in_head
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



24
25
# File 'lib/pageflow/chart/scraper.rb', line 24

def csv_url
end

#htmlObject



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

def html
  document.to_s
end