lib/knapsack_pro/client/api/action.rb in knapsack_pro-0.2.1 vs lib/knapsack_pro/client/api/action.rb in knapsack_pro-0.3.0
- old
+ new
@@ -2,15 +2,13 @@
module Client
module API
class Action
attr_reader :endpoint_path, :http_method, :request_hash
- def initialize(endpoint_path:,
- http_method:,
- request_hash:)
- @endpoint_path = endpoint_path
- @http_method = http_method
- @request_hash = request_hash
+ def initialize(args)
+ @endpoint_path = args.fetch(:endpoint_path)
+ @http_method = args.fetch(:http_method)
+ @request_hash = args.fetch(:request_hash)
end
end
end
end
end