Class: Fluent::Platforms::MechanizeDriver::PlatformObject
- Inherits:
-
Object
- Object
- Fluent::Platforms::MechanizeDriver::PlatformObject
- Defined in:
- lib/fluent/platform_mechanize/platform_object.rb
Instance Attribute Summary collapse
-
#driver ⇒ Object
readonly
Returns the value of attribute driver.
Instance Method Summary collapse
- #get_cookie_value(name) ⇒ Object
-
#initialize(driver) ⇒ PlatformObject
constructor
A new instance of PlatformObject.
- #markup ⇒ Object
-
#visit(url) ⇒ Object
Browser-Level Actions ##.
Constructor Details
#initialize(driver) ⇒ PlatformObject
Returns a new instance of PlatformObject.
8 9 10 |
# File 'lib/fluent/platform_mechanize/platform_object.rb', line 8 def initialize(driver) @driver = driver end |
Instance Attribute Details
#driver ⇒ Object (readonly)
Returns the value of attribute driver.
6 7 8 |
# File 'lib/fluent/platform_mechanize/platform_object.rb', line 6 def driver @driver end |
Instance Method Details
#get_cookie_value(name) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/fluent/platform_mechanize/platform_object.rb', line 22 def (name) for in driver.. if .name == name return .value end end end |
#markup ⇒ Object
18 19 20 |
# File 'lib/fluent/platform_mechanize/platform_object.rb', line 18 def markup driver.current_page.body end |
#visit(url) ⇒ Object
Browser-Level Actions ##
14 15 16 |
# File 'lib/fluent/platform_mechanize/platform_object.rb', line 14 def visit(url) driver.get(url) end |