Class: Navigable::Server::Parsers::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/navigable/server/parsers/factory.rb

Class Method Summary collapse

Class Method Details

.build(media_type:) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/navigable/server/parsers/factory.rb', line 7

def self.build(media_type:)
  case media_type
  when /application\/json/
    Parsers::JSON
  else
    Parsers::Null
  end
end