Class: DMMCrawler::Attributes::BaseAttributes

Inherits:
Object
  • Object
show all
Defined in:
lib/dmm-crawler/attributes/base_attributes.rb

Direct Known Subclasses

AdultGameAttributes, DojinAttributes

Constant Summary collapse

HTTP_STATUS_CODE_OF_SUCCESS =
200

Instance Method Summary collapse

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_aObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/dmm-crawler/attributes/base_attributes.rb', line 13

def to_a
  raise NotImplementedError
end