Method: SL::GoogleSearch.test_for_key
- Defined in:
- lib/searchlink/searches/google.rb
.test_for_key ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/searchlink/searches/google.rb', line 17 def test_for_key return false unless SL.config.key?('google_api_key') && SL.config['google_api_key'] key = SL.config['google_api_key'] return false if key =~ /^(x{4,})?$/i @api_key = key true end |