Module: CLXRestAPI::EndpointDSL
- Included in:
- Client
- Defined in:
- lib/clx_rest_api/endpoint_dsl.rb
Instance Method Summary collapse
Instance Method Details
#define_endpoint(name, method, uri) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/clx_rest_api/endpoint_dsl.rb', line 7 def define_endpoint(name, method, uri) define_method(name) do |args = {}| uri = URIInterpretation.new(uri, OpenStruct.new(args), config: @config).to_s request = CLXRestAPI::Request.new(uri, method: method, config: @config) request.execute(args[:params]) end end |