Class: RmsApiRuby::RestApi::Base
- Inherits:
-
Object
- Object
- RmsApiRuby::RestApi::Base
- Includes:
- HashKeysCamelizable, Waterfall
- Defined in:
- lib/rms_api_ruby/rest_api/base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(args, client_class = RmsApiRuby::Chain::HttpClient) ⇒ Base
constructor
A new instance of Base.
Methods included from HashKeysCamelizable
Constructor Details
#initialize(args, client_class = RmsApiRuby::Chain::HttpClient) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rms_api_ruby/rest_api/base.rb', line 10 def initialize(args, client_class = RmsApiRuby::Chain::HttpClient) @args = args @client = client_class.new( method: http_method, url: url, params: form_params(args), headers: http_headers, return_method: :result ) end |
Instance Method Details
#call ⇒ Object
21 22 23 24 25 |
# File 'lib/rms_api_ruby/rest_api/base.rb', line 21 def call chain { log :info, } chain(response: :response) { @client.call } chain { log :info, } end |