Module: APISmith::Client::ClassMethods

Defined in:
lib/api_smith/client.rb

Overview

Class level methods to let you configure your api client.

Instance Method Summary collapse

Instance Method Details

#endpoint(value = nil) ⇒ Object

When present, lets you specify the api for the given client.

Examples:

Setting a string endpoint

endpoint 'v1'

Unsetting the string endpoint

endpoint nil

Parameters:

  • value (String, nil) (defaults to: nil)

    the endpoint to use.



324
325
326
# File 'lib/api_smith/client.rb', line 324

def endpoint(value = nil)
  define_method(:endpoint) { value }
end