lib/support.rb in garb-0.8.3 vs lib/support.rb in garb-0.8.4

- old
+ new

@@ -15,21 +15,22 @@ :does_not_match => '!=', :contains => '=~', :does_not_contain => '!~', :substring => '=@', :not_substring => '!@', - :desc => '-' + :desc => '-', + :descending => '-' } target = Garb.to_google_analytics(@field) operator = operators[@operator] - @operator == :desc ? "#{operator}#{target}" : "#{target}#{operator}" + [:desc, :descending].include?(@operator) ? "#{operator}#{target}" : "#{target}#{operator}" end end class Symbol - [:eql, :not_eql, :gt, :gte, :lt, :lte, :desc, + [:eql, :not_eql, :gt, :gte, :lt, :lte, :desc, :descending, :matches, :does_not_match, :contains, :does_not_contain, :substring, :not_substring].each do |operator| define_method(operator) do SymbolOperator.new(self, operator)