Class: Munchsrb::Gather::Scenario

Inherits:
Object
  • Object
show all
Defined in:
lib/munchsrb/gather/scenario.rb

Overview

Munchsrb::Gather::Scenario written story page scraping.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeScenario

Returns a new instance of Scenario.



9
10
11
12
13
# File 'lib/munchsrb/gather/scenario.rb', line 9

def initialize
  @page = open
  @driver = Munchsrb::Gather.driver
  @details = nil
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



7
8
9
# File 'lib/munchsrb/gather/scenario.rb', line 7

def details
  @details
end

Instance Method Details

#executeObject



15
16
17
18
19
20
21
22
# File 'lib/munchsrb/gather/scenario.rb', line 15

def execute
  @page.menu_link.click # open menu page
  Munchsrb::Gather::PageObject::MenuPage.new.tap do |page|
    @details = page.details
  end
ensure
  quit
end