def method_signature(e, method)
      file, line, call_method = e.backtrace.first.split(':')
      call_method             = call_method.gsub(/[']/, '').split('`').last
      if call_method && call_method.to_sym == method.to_sym
        source_line = File.open(file).to_a[line.to_i - 1].chomp!
        if source_line =~ /def #{method}/
          signature = source_line.strip.gsub(/,/, '').split(%r{[ ()]})
          signature.shift # remove def
          return signature.reject { |a| a =~ /^([={}\)\(])*$/ }
        end
      end
      []
    rescue
      []
    end
def method_signature(e, method)
      file, line, call_method = e.backtrace.first.split(':')
      call_method             = call_method.gsub(/[']/, '').split('`').last
      if call_method && call_method.to_sym == method.to_sym
        source_line = File.open(file).to_a[line.to_i - 1].chomp!
        if source_line =~ /def #{method}/
          signature = source_line.strip.gsub(/,/, '').split(%r{[ ()]})
          signature.shift # remove def
          return signature.reject { |a| a =~ /^([={}\)\(])*$/ }
        end
      end
      []
    rescue
      []
    end
e.backtrack.first looks like this:
 ..../dnsmadeeasy/lib/dnsmadeeasy/api/client.rb:143:in `create_a_record'