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

Since:

  • 0.2.0



25
26
27
28
29
30
31
32
# File 'lib/hanami/routing/parsing/parser.rb', line 25

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



35
36
37
# File 'lib/hanami/routing/parsing/parser.rb', line 35

def mime_types
  raise NotImplementedError
end

#parse(body) ⇒ Object

Since:

  • 0.2.0



40
41
42
# File 'lib/hanami/routing/parsing/parser.rb', line 40

def parse(body)
  Hash.new
end