Class: OmniScrapper::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/omni_scrapper/page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page, config) ⇒ Page

Returns a new instance of Page.



5
6
7
8
# File 'lib/omni_scrapper/page.rb', line 5

def initialize(page, config)
  self.page = page
  self.config = config
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



3
4
5
# File 'lib/omni_scrapper/page.rb', line 3

def config
  @config
end

#pageObject

Returns the value of attribute page.



3
4
5
# File 'lib/omni_scrapper/page.rb', line 3

def page
  @page
end

Instance Method Details

#dataObject



10
11
12
13
# File 'lib/omni_scrapper/page.rb', line 10

def data
  result_data = prepare_data
  validate_data!(result_data)
end