Class: NiwaTextream::MainPage

Inherits:
Object
  • Object
show all
Defined in:
lib/niwa_textream/pages/main/main_page.rb

Constant Summary collapse

@@url =
nil

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mechanize) ⇒ MainPage

Returns a new instance of MainPage.



15
16
17
# File 'lib/niwa_textream/pages/main/main_page.rb', line 15

def initialize(mechanize)
  @mechanize = mechanize
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/niwa_textream/pages/main/main_page.rb', line 3

def url
  @url
end

Class Method Details

.goTo(mechanize) ⇒ Object

go to page by using mechanize



20
21
22
# File 'lib/niwa_textream/pages/main/main_page.rb', line 20

def self.goTo(mechanize)
  @page = mechanize.get(@@url)
end

.urlObject



24
25
26
# File 'lib/niwa_textream/pages/main/main_page.rb', line 24

def self.url
  @@url
end