Design updates with error handling

This commit is contained in:
bterkuile committed 2025-10-18 09:13:12 -05:00
1 parent 4c73608549
commit 4b84df0af9
9 files changed
+124 -38

No files matched your search

+6 -3
View File
@@ -3,9 +3,7 @@
module StrikeMe
module API
class Client
attr_reader :version, :connection
delegate :get, to: :connection
attr_reader :version, :connection, :last_response
def initialize(**args)
@version = args[:version] || 'v1'
@@ -23,6 +21,11 @@ module StrikeMe
builder.response :json
end
end
#delegate :get, to: :connection
def get(...)
@last_response = connection.get(...)
end
end
end
end