Class: Mache::Page
Overview
The Page class wraps an HTML page with an application-specific API. You can extend it to define your own API for manipulating the pages of your web application.
Instance Attribute Summary collapse
-
#path ⇒ String
readonly
The path where the page is located, without any domain information.
Attributes inherited from Node
Class Method Summary collapse
-
.visit ⇒ Page
Creates a new page object and calls #visit on it.
Instance Method Summary collapse
-
#current? ⇒ Boolean
Tests whether the page is current.
-
#initialize(node: Capybara.current_session, path: nil) ⇒ Page
constructor
Returns a new page object.
-
#visit ⇒ Page
Visits the page at its #path.
Methods inherited from Node
Methods included from DSL
Constructor Details
#initialize(node: Capybara.current_session, path: nil) ⇒ Page
Returns a new page object.
34 35 36 37 |
# File 'lib/mache/page.rb', line 34 def initialize(node: Capybara.current_session, path: nil) @node = node @path = path end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Mache::Node
Instance Attribute Details
#path ⇒ String (readonly)
The path where the page is located, without any domain information.
28 29 30 |
# File 'lib/mache/page.rb', line 28 def path @path end |