Class: Liberty::Adapters::Parsers::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/liberty/adapters/parsers/factory.rb

Class Method Summary collapse

Class Method Details

.build(media_type:) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/liberty/adapters/parsers/factory.rb', line 10

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