Class Spec::Runner::ClassAndArgumentsParser

  1. lib/spec/runner/class_and_arguments_parser.rb
Parent: Object

Methods

public class

  1. parse

Public class methods

parse (s)
[show source]
# File lib/spec/runner/class_and_arguments_parser.rb, line 4
      def self.parse(s)
        if s =~ /([a-zA-Z_]+(?:::[a-zA-Z_]+)*):?(.*)/
          arg = $2 == "" ? nil : $2
          [$1, arg]
        else
          raise "Couldn't parse #{s.inspect}"
        end
      end