Class: AmazonDeets::MechanizedContext
- Inherits:
-
Object
- Object
- AmazonDeets::MechanizedContext
- Defined in:
- lib/amazon_deets/core.rb
Overview
A MechanizedContext is similar to a scraper, but it assumes that the @agent has already navigated to the URL that is going to be scraped.
Direct Known Subclasses
GeneralMerchandiseFragment::Context, KindleFragment::Context
Instance Attribute Summary collapse
-
#agent ⇒ Object
Returns the value of attribute agent.
Instance Method Summary collapse
-
#initialize(agent: Mechanized.new) ⇒ MechanizedContext
constructor
A new instance of MechanizedContext.
- #scrape ⇒ Object
Constructor Details
#initialize(agent: Mechanized.new) ⇒ MechanizedContext
Returns a new instance of MechanizedContext.
73 74 75 |
# File 'lib/amazon_deets/core.rb', line 73 def initialize(agent: Mechanized.new) @agent = agent end |
Instance Attribute Details
#agent ⇒ Object
Returns the value of attribute agent.
71 72 73 |
# File 'lib/amazon_deets/core.rb', line 71 def agent @agent end |
Instance Method Details
#scrape ⇒ Object
78 79 80 |
# File 'lib/amazon_deets/core.rb', line 78 def scrape raise NotImplementedError end |