rubocop corrections

This commit is contained in:
bterkuile committed 2025-10-18 09:29:55 -05:00
1 parent 4b84df0af9
commit 4a7b752ace
4 files changed
+50 -39

No files matched your search

+10 -14
View File
@@ -2,7 +2,6 @@
module StrikeMe
module API
# Factory helper object connecting the client to the models
class Account
include BaseClient
@@ -16,14 +15,13 @@ module StrikeMe
url = profile_url
response = client.get url
#body = response.body.presence
#body = JSON.parse(body) if body.is_a? String
if response.success?
@profile = Profile.new response.body.merge(account: self)
else
# if you see this, something went wrong, this is test code
raise ResponseError.new(url, response.body)
end
# body = response.body.presence
# body = JSON.parse(body) if body.is_a? String
raise ResponseError.new(url, response.body) unless response.success?
@profile = Profile.new response.body.merge(account: self)
# if you see this, something went wrong, this is test code
end
def profile_url
@@ -39,11 +37,9 @@ module StrikeMe
return @balances if @balances.present?
response = client.get 'balances'
if response.success?
@balances = Balances.new self, response.body
else
raise ResponseError.new('balances', response.body)
end
raise ResponseError.new('balances', response.body) unless response.success?
@balances = Balances.new self, response.body
end
def inspect
+1 -1
View File
@@ -22,7 +22,7 @@ module StrikeMe
end
end
#delegate :get, to: :connection
# delegate :get, to: :connection
def get(...)
@last_response = connection.get(...)
end