Sha256: 0bad0511771181110bb1b5fab5606f82e960152002de9b131ce0653b1e8fd321

Contents?: true

Size: 838 Bytes

Versions: 34

Compression:

Stored size: 838 Bytes

Contents

module Workarea
  class Order
    module Status
      class Cart
        include StatusCalculator::Status

        def in_status?
          !order.canceled? &&
            !order.placed? &&
            !order.checking_out? &&
            !order.abandoned?
        end
      end

      class Canceled
        include StatusCalculator::Status

        def in_status?
          order.canceled?
        end
      end

      class Placed
        include StatusCalculator::Status

        def in_status?
          order.placed?
        end
      end

      class Checkout
        include StatusCalculator::Status

        def in_status?
          order.checking_out?
        end
      end

      class Abandoned
        include StatusCalculator::Status

        def in_status?
          order.abandoned?
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-core-3.4.45 app/models/workarea/order/status.rb
workarea-core-3.4.44 app/models/workarea/order/status.rb
workarea-core-3.4.43 app/models/workarea/order/status.rb
workarea-core-3.4.42 app/models/workarea/order/status.rb
workarea-core-3.4.41 app/models/workarea/order/status.rb
workarea-core-3.4.40 app/models/workarea/order/status.rb
workarea-core-3.4.39 app/models/workarea/order/status.rb
workarea-core-3.4.38 app/models/workarea/order/status.rb
workarea-core-3.4.37 app/models/workarea/order/status.rb
workarea-core-3.4.36 app/models/workarea/order/status.rb
workarea-core-3.4.35 app/models/workarea/order/status.rb
workarea-core-3.4.34 app/models/workarea/order/status.rb
workarea-core-3.4.33 app/models/workarea/order/status.rb
workarea-core-3.4.32 app/models/workarea/order/status.rb
workarea-core-3.4.31 app/models/workarea/order/status.rb
workarea-core-3.4.30 app/models/workarea/order/status.rb
workarea-core-3.4.29 app/models/workarea/order/status.rb
workarea-core-3.4.28 app/models/workarea/order/status.rb
workarea-core-3.4.27 app/models/workarea/order/status.rb
workarea-core-3.4.26 app/models/workarea/order/status.rb