Flowdock
method

parse_task_string

Importance_0
v2_2_9 - Show latest stable - 0 notes - Class: Application
parse_task_string(string) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rake/application.rb, line 153
    def parse_task_string(string) # :nodoc:
      /^([^\[]+)(?:\[(.*)\])$/ =~ string.to_s

      name           = $1
      remaining_args = $2

      return string, [] unless name
      return name,   [] if     remaining_args.empty?

      args = []

      begin
        /((?:[^\\,]|\\.)*?)\s*(?:,\s*(.*))?$/ =~ remaining_args

        remaining_args = $2
        args << $1.gsub(/\\(.)/, '\1')
      end while remaining_args

      return name, args
    end
Register or log in to add new notes.