Skip to content

Basic Web Scraper#66

Open
yxlau wants to merge 5 commits intovikingeducation:masterfrom
yxlau:master
Open

Basic Web Scraper#66
yxlau wants to merge 5 commits intovikingeducation:masterfrom
yxlau:master

Conversation

@yxlau
Copy link

@yxlau yxlau commented Jan 29, 2017

No description provided.

Copy link

@remis1889 remis1889 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed.

class Scraper
attr_reader :results
def initialize(opts={})
unless opts.empty?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a branch for when opts is empty.

end

def run_search(opts)
for_one = opts[:for_one] ? opts[:for_one] : ''

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way to write this:
opts[:for_one] ||= ''
and then use opts[:for_one] in m.get(). You can repeat the same for other options too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants