Method: Autoproj::SourcePackageQuery.parse

Defined in:
lib/autoproj/source_package_query.rb

.parse(str) ⇒ Object

Parse a single field in a query (i.e. a FIELDVALUE string)



115
116
117
118
119
120
121
122
123
124
125
# File 'lib/autoproj/source_package_query.rb', line 115

def self.parse(str)
    if str =~ /[=~]/
        fields, value, partial =
            super(str, default_fields: DEFAULT_FIELDS, allowed_fields: ALLOWED_FIELDS)
        new(fields, value, partial)
    else
        match_name = parse("autobuild.name~#{str}")
        match_dir  = parse("autobuild.srcdir~#{str}")
        Or.new([match_name, match_dir])
    end
end