Class: DMMCrawler::Client
- Inherits:
-
Object
- Object
- DMMCrawler::Client
- Defined in:
- lib/dmm-crawler/client.rb
Instance Attribute Summary collapse
-
#agent ⇒ Object
Returns the value of attribute agent.
Instance Method Summary collapse
- #adult_game_rankings(arguments) ⇒ Object
- #affiliateable?(url) ⇒ Boolean
- #get_attributes(url) ⇒ Object
-
#initialize {|@agent| ... } ⇒ Client
constructor
A new instance of Client.
- #rankings(arguments) ⇒ Object
Constructor Details
Instance Attribute Details
#agent ⇒ Object
Returns the value of attribute agent.
3 4 5 |
# File 'lib/dmm-crawler/client.rb', line 3 def agent @agent end |
Instance Method Details
#adult_game_rankings(arguments) ⇒ Object
15 16 17 |
# File 'lib/dmm-crawler/client.rb', line 15 def adult_game_rankings(arguments) Ranking::AdultGameRanking.new(arguments.merge!(agent: @agent)).arts end |
#affiliateable?(url) ⇒ Boolean
23 24 25 |
# File 'lib/dmm-crawler/client.rb', line 23 def affiliateable?(url) Attributes::DojinAttributes.new(url, agent: @agent).affiliateable? end |
#get_attributes(url) ⇒ Object
19 20 21 |
# File 'lib/dmm-crawler/client.rb', line 19 def get_attributes(url) Attributes::DojinAttributes.new(url, agent: @agent).to_a end |
#rankings(arguments) ⇒ Object
11 12 13 |
# File 'lib/dmm-crawler/client.rb', line 11 def rankings(arguments) Ranking::DojinRanking.new(arguments.merge!(agent: @agent)).arts end |