Skip to content

Commit

Permalink
Merge pull request #1 from drpebcak/style-cleanup
Browse files Browse the repository at this point in the history
ship it!
  • Loading branch information
matthewshafer committed Mar 18, 2014
2 parents 058b47d + fe1b09e commit db3f3e8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/tankard/api/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,11 @@ def http_request_parameters
end

def raise_if_required_options_not_set
case @options.endpoint
when nil
if @options.endpoint.nil?
fail Tankard::Error::MissingParameter, 'No search query set' unless @options.q?
when 'upc'
elsif @options.endpoint == 'upc'
fail Tankard::Error::MissingParameter, 'missing parameter: code' unless @options.code?
when 'geo/point'
elsif @options.endpoint == 'geo/point'
fail Tankard::Error::MissingParameter, 'missing Parameters: lat, lng' unless @options.lat? && @options.lng?
end
end
Expand Down

0 comments on commit db3f3e8

Please sign in to comment.