Sha256: 51b11399259b2c1c40a515c20d792a65833a8ff644729a9b34d2e97f3392a18e
Contents?: true
Size: 461 Bytes
Versions: 1
Compression:
Stored size: 461 Bytes
Contents
require "clx_rest_api/uri_interpretation" require "clx_rest_api/request" require "ostruct" module CLXRestAPI module EndpointDSL def define_endpoint(name, method, uri) define_method(name) do |args = {}| new_uri = URIInterpretation.new(uri, OpenStruct.new(args), config: @config).to_s request = CLXRestAPI::Request.new(new_uri, method: method, config: @config) request.execute(args[:params] || {}) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
clx_rest_api-0.1.4 | lib/clx_rest_api/endpoint_dsl.rb |