Module: ActionWebService::Protocol::Registry::ClassMethods

Defined in:
lib/action_web_service/protocol/registry.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#register_protocol(type, klass) ⇒ Object

:nodoc:



14
15
16
17
18
19
20
21
22
23
# File 'lib/action_web_service/protocol/registry.rb', line 14

def register_protocol(type, klass) # :nodoc:
  case type
  when HeaderAndBody
    write_inheritable_array("header_and_body_protocols", [klass])
  when BodyOnly
    write_inheritable_array("body_only_protocols", [klass])
  else
    raise(ProtocolError, "unknown protocol type #{type}")
  end
end