Class: CapybaraPageObject::Base
- Inherits:
-
Object
- Object
- CapybaraPageObject::Base
- Includes:
- Extractors::Common, Extractors::PageLevel
- Defined in:
- lib/base.rb
Instance Attribute Summary collapse
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source = nil) ⇒ Base
constructor
A new instance of Base.
- #path(*args) ⇒ Object
- #prefix ⇒ Object
- #visit ⇒ Object
Methods included from Extractors::PageLevel
#forms, #meta_description, #meta_keywords, #tables, #title
Methods included from Extractors::Common
Constructor Details
Instance Attribute Details
#source ⇒ Object
Returns the value of attribute source.
6 7 8 |
# File 'lib/base.rb', line 6 def source @source end |
Instance Method Details
#path(*args) ⇒ Object
13 14 15 |
# File 'lib/base.rb', line 13 def path(*args) raise PageObjectMissingPath, "You need to override this" end |
#prefix ⇒ Object
17 18 19 |
# File 'lib/base.rb', line 17 def prefix '' end |
#visit ⇒ Object
21 22 23 24 |
# File 'lib/base.rb', line 21 def visit source.visit prefix + path self end |