Sha256: e70bf44b34d5dab364aa03951fa4b15cb0802162824101332dc1d45eaa40908a

Contents?: true

Size: 335 Bytes

Versions: 59

Compression:

Stored size: 335 Bytes

Contents

module Spec
  module Runner
    class ClassAndArgumentsParser
      class << self
        def 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
      end
    end
  end
end

Version data entries

59 entries across 59 versions & 10 rubygems

Version Path
dchelimsky-rspec-1.1.10 lib/spec/runner/class_and_arguments_parser.rb
dchelimsky-rspec-1.1.11 lib/spec/runner/class_and_arguments_parser.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/class_and_arguments_parser.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/class_and_arguments_parser.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/class_and_arguments_parser.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/class_and_arguments_parser.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/class_and_arguments_parser.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/class_and_arguments_parser.rb
mack-0.8.2 lib/gems/rspec-1.1.11/lib/spec/runner/class_and_arguments_parser.rb
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
picolena-0.1.0 rails_plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
picolena-0.1.1 rails_plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
picolena-0.1.2 rails_plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
picolena-0.1.3 rails_plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
picolena-0.1.4 rails_plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb
picolena-0.1.5 rails_plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb