Module: ROM::HTTP::Dataset::ClassInterface Private

Included in:
ROM::HTTP::Dataset
Defined in:
lib/rom/http/dataset/class_interface.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#default_request_handler(handler = Undefined) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

TODO: Remove in favour of configuration



12
13
14
15
16
17
18
19
# File 'lib/rom/http/dataset/class_interface.rb', line 12

def default_request_handler(handler = Undefined)
  ::Dry::Core::Deprecations.announce(
    __method__,
    'use configuration instead'
  )
  return config.default_request_handler if Undefined === handler
  config.default_request_handler = handler
end

#default_response_handler(handler = Undefined) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

TODO: Remove in favour of configuration



22
23
24
25
26
27
28
29
# File 'lib/rom/http/dataset/class_interface.rb', line 22

def default_response_handler(handler = Undefined)
  ::Dry::Core::Deprecations.announce(
    __method__,
    'use configuration instead'
  )
  return config.default_response_handler if Undefined === handler
  config.default_response_handler = handler
end