Class: DMMCrawler::Attributes::BaseAttributes
- Inherits:
-
Object
- Object
- DMMCrawler::Attributes::BaseAttributes
- Defined in:
- lib/dmm-crawler/attributes/base_attributes.rb
Direct Known Subclasses
Constant Summary collapse
- HTTP_STATUS_CODE_OF_SUCCESS =
200
Instance Method Summary collapse
-
#initialize(url, agent: Agent.instance.agent) ⇒ BaseAttributes
constructor
A new instance of BaseAttributes.
- #to_a ⇒ Object
Constructor Details
#initialize(url, agent: Agent.instance.agent) ⇒ BaseAttributes
Returns a new instance of BaseAttributes.
8 9 10 11 |
# File 'lib/dmm-crawler/attributes/base_attributes.rb', line 8 def initialize(url, agent: Agent.instance.agent) @page = agent.get(url) @r_client = Rdmm::Client.new(affiliate_id: ENV['DMM_AFFILIATE_ID'], api_id: ENV['DMM_API_ID']) end |
Instance Method Details
#to_a ⇒ Object
13 14 15 |
# File 'lib/dmm-crawler/attributes/base_attributes.rb', line 13 def to_a raise NotImplementedError end |