Class: Rapid::Services::Requests::NullHandler

Inherits:
Handler show all
Defined in:
lib/ury_rapid/services/requests/null_handler.rb

Overview

Null-object for request handling

This handler is intended to be used when no other handler is registered.

Constant Summary

Constants inherited from Handler

Handler::HOOKS

Instance Method Summary collapse

Methods inherited from Handler

add_hook, add_id_hook, delete_by_deleting_children, on_delete, post_by_putting_to_child_for, put_by_payload_processor, put_by_posting_to_parent, #run, service_should_override, use_payload_processor_for

Methods inherited from Handler

def_targets, register_into, #targets, targets?, use_poster

Constructor Details

#initializeNullHandler

Returns a new instance of NullHandler


12
13
14
# File 'lib/ury_rapid/services/requests/null_handler.rb', line 12

def initialize
  super(nil, nil, nil, nil)
end

Instance Method Details

#call(action, *_args) ⇒ Object


20
21
22
23
24
25
# File 'lib/ury_rapid/services/requests/null_handler.rb', line 20

def call(action, *_args)
  fail(
    Rapid::Common::Exceptions::NotSupportedByRapid,
    "Tried to perform #{action} on an object with no handler."
  )
end

#to_sObject


16
17
18
# File 'lib/ury_rapid/services/requests/null_handler.rb', line 16

def to_s
  'NO HANDLER'
end