Class: ArtPaintingsExtractor::HtmlDocument

Inherits:
Object
  • Object
show all
Defined in:
lib/art_paintings_extractor/html_document.rb

Overview

Class responsible for reading the contents of an HTML file

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ HtmlDocument

Returns a new instance of HtmlDocument.



8
9
10
11
# File 'lib/art_paintings_extractor/html_document.rb', line 8

def initialize(html)
  @html = html
  @logger = Logger.new($stdout)
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



6
7
8
# File 'lib/art_paintings_extractor/html_document.rb', line 6

def logger
  @logger
end

Instance Method Details

#callObject



13
14
15
# File 'lib/art_paintings_extractor/html_document.rb', line 13

def call
  extract_from_html
end