Module: APIClientBase::Response
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/api_client_base/response.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.module(opts = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/api_client_base/response.rb', line 4 def self.module(opts={}) mod = Module.new do mattr_accessor :api_client_base_response_options def self.included(base) base.class_attribute :api_client_base_response_options base. = self. base.send :include, APIClientBase::Response end end mod. = opts mod end |
Instance Method Details
#default_code ⇒ Object
34 35 36 |
# File 'lib/api_client_base/response.rb', line 34 def default_code raw_response.code end |
#default_success ⇒ Object
30 31 32 |
# File 'lib/api_client_base/response.rb', line 30 def default_success raw_response.success? end |