Sha256: b786e9752a9531f0c9437a40821a5d63027065e37dd06a323439455b2613f91f

Contents?: true

Size: 227 Bytes

Versions: 9

Compression:

Stored size: 227 Bytes

Contents

module Tienda
  module Errors
    class NotEnoughStock < Error
      def available_stock
        @options[:ordered_item].stock
      end

      def requested_stock
        @options[:requested_stock]
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tienda-2.1.3 lib/tienda/errors/not_enough_stock.rb
tienda-2.1.2 lib/tienda/errors/not_enough_stock.rb
tienda-2.1.1 lib/tienda/errors/not_enough_stock.rb
tienda-2.1.0 lib/tienda/errors/not_enough_stock.rb
tienda-2.0.2 lib/tienda/errors/not_enough_stock.rb
tienda-2.0.1 lib/tienda/errors/not_enough_stock.rb
tienda-1.1.2 lib/tienda/errors/not_enough_stock.rb
tienda-1.1.1 lib/tienda/errors/not_enough_stock.rb
tienda-1.1.0 lib/tienda/errors/not_enough_stock.rb