You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: body_parser.rb
    path of file: ./repos/shoryuken/lib/shoryuken
    
    the code of the file until where you have to start completion: module Shoryuken
  class BodyParser
    class << self
      def parse(worker_class, sqs_msg)
        body_parser = worker_class.get_shoryuken_options['body_parser']

        case body_parser
        when :json
          JSON.parse(sqs_msg.body)
        when Proc
          body_parser.call(sqs_msg)
        when :text, nil
          sqs_msg.body
        else
          if body_parser.respond_to?(:parse)
            # JSON.parse
            body_parser.parse(sqs_msg
    
      def parse(worker_class, sqs_msg)
        body_parser = worker_class.get_shoryuken_options['body_parser']

        case body_parser
        when :json
          JSON.parse(sqs_msg.body)
        when Proc
          body_parser.call(sqs_msg)
        when :text, nil
          sqs_msg.body
        else
          if body_parser.respond_to?(:parse)
            # JSON.parse
            body_parser.parse(sqs_msg.body)
          elsif body_parser.respond_to?(:load)
            # see https://github.com/phstc/shoryuken/pull/91
            # JSON.load
            body_parser.load(sqs_msg.body)
          end