Sha256: 7c5afd14ebc6158ec16d162811f6336be5cabd2afcbb41becf17c4cf44e3c1ce

Contents?: true

Size: 315 Bytes

Versions: 1

Compression:

Stored size: 315 Bytes

Contents

module Workarea
  class Segment
    module Rules
      class LastOrder < Base
        field :days, type: Integer

        def qualifies?(visit)
          return false if visit.metrics.last_order_at.blank? || days.blank?
          visit.metrics.last_order_at >= days.days.ago
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
workarea-core-3.5.0.beta.1 app/models/workarea/segment/rules/last_order.rb