Method: Hx::Interop::ContentTypes#register

Defined in:
lib/interop/content_types.rb

#register(content_type, marshaler = nil) ⇒ Object



5
6
7
8
9
# File 'lib/interop/content_types.rb', line 5

def register(content_type, marshaler = nil)
  content_type = ContentType.new(content_type, marshaler) unless content_type.is_a? ContentType
  self << content_type
  content_type
end