lib/apitizer/connection/request.rb in apitizer-0.0.2 vs lib/apitizer/connection/request.rb in apitizer-0.0.3
- old
+ new
@@ -4,13 +4,13 @@
extend Forwardable
attr_reader :method, :path, :parameters
def_delegator :path, :address
- def initialize(method:, path:, parameters: {})
- @method = method
- @path = path
- @parameters = parameters
+ def initialize(options)
+ @method = options.fetch(:method)
+ @path = options.fetch(:path)
+ @parameters = options[:parameters] || {}
end
end
end
end