Module: Rack::App::Utils::Parser

Extended by:
Parser
Included in:
Parser
Defined in:
lib/rack/app/utils/parser.rb

Instance Method Summary collapse

Instance Method Details

#parse(type, str) ⇒ Object



12
13
14
15
16
17
# File 'lib/rack/app/utils/parser.rb', line 12

def parse(type, str)
  string = str.to_s
  parser = get_parser(type)
  return unless parser.validate(string)
  parser.parse(string)
end