Skip to content

Commit

Permalink
Merge pull request #4 from milk1000cc/tanakai/splat-opts
Browse files Browse the repository at this point in the history
splat opts to fix ruby 3 keyword args
  • Loading branch information
glaucocustodio committed Oct 25, 2023
2 parents 0becb7f + a0986ac commit 9494164
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tanakai/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def self.crawl!(exception_on_fail: true)
if start_urls
start_urls.each do |start_url|
if start_url.class == Hash
spider.request_to(:parse, start_url)
spider.request_to(:parse, **start_url)
else
spider.request_to(:parse, url: start_url)
end
Expand Down Expand Up @@ -160,7 +160,7 @@ def self.parse!(handler, *args, **request)
if args.present?
spider.public_send(handler, *args)
elsif request.present?
spider.request_to(handler, request)
spider.request_to(handler, **request)
else
spider.public_send(handler)
end
Expand Down

0 comments on commit 9494164

Please sign in to comment.