Class: Hanami::Routing::Parsing::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/hanami/routing/parsing/parser.rb

Overview

Since:

  • 0.2.0

Direct Known Subclasses

JsonParser

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.for(parser) ⇒ 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.

Since:

  • 0.2.0



28
29
30
31
32
33
34
35
# File 'lib/hanami/routing/parsing/parser.rb', line 28

def self.for(parser)
  case parser
  when String, Symbol
    require_parser(parser)
  else
    parser
  end
end

Instance Method Details

#mime_typesObject

Raises:

  • (NotImplementedError)

Since:

  • 0.2.0



38
39
40
# File 'lib/hanami/routing/parsing/parser.rb', line 38

def mime_types
  raise NotImplementedError
end

#parse(body) ⇒ Object

Since:

  • 0.2.0



43
44
45
# File 'lib/hanami/routing/parsing/parser.rb', line 43

def parse(body)
  Hash.new
end