Sha256: 73246466191866d3e71ad410f669130629d7fd4a793a02fcdb809c69422b325d

Contents?: true

Size: 315 Bytes

Versions: 10

Compression:

Stored size: 315 Bytes

Contents

module Shoppe
  module Errors
    class NotEnoughStock < Error
      
      def initialize(options)
        @options = options
      end
      
      def available_stock
        @options[:product].stock
      end
      
      def requested_stock
        @options[:requested_stock]
      end
      
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shoppe-0.0.14 lib/shoppe/errors/not_enough_stock.rb
shoppe-0.0.13 lib/shoppe/errors/not_enough_stock.rb
shoppe-0.0.12 lib/shoppe/errors/not_enough_stock.rb
shoppe-0.0.11 lib/shoppe/errors/not_enough_stock.rb
shoppe-0.0.10 lib/shoppe/errors/not_enough_stock.rb
shoppe-0.0.9 lib/shoppe/errors/not_enough_stock.rb
shoppe-0.0.8 lib/shoppe/errors/not_enough_stock.rb
shoppe-0.0.7 lib/shoppe/errors/not_enough_stock.rb
shoppe-0.0.6 lib/shoppe/errors/not_enough_stock.rb
shoppe-0.0.5 lib/shoppe/errors/not_enough_stock.rb