-
Notifications
You must be signed in to change notification settings - Fork 4
Override client inspect #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
74ea4b4
17f344e
e7da9cf
d83a394
9813628
ca9fdcb
31ae742
0cae5d8
471219a
eee8082
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,6 +181,20 @@ def close | |
| @socket.close if @socket | ||
| end | ||
|
|
||
| def to_s | ||
| # If the api_key is set, mask it | ||
| masked_api_key = if api_key && api_key.length > 4 | ||
| "#{api_key[0..3]}#{'*' * (api_key.length - 4)}" | ||
| else | ||
| api_key | ||
| end | ||
| "SerpApi::Client(engine: #{engine}, api_key: #{masked_api_key}, persistent: #{persistent?}, timeout: #{timeout}s)" | ||
|
||
| end | ||
|
|
||
| def inspect | ||
| to_s | ||
| end | ||
|
|
||
| private | ||
|
|
||
| # @param [Hash] params to merge with default parameters provided to the constructor. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| module SerpApi | ||
| # Current version of the gem | ||
| VERSION = '1.0.1'.freeze | ||
| VERSION = '1.0.2'.freeze | ||
| end |

Uh oh!
There was an error while loading. Please reload this page.