app/models/piggybak/shipping_calculator/range.rb in piggybak-0.5.5 vs app/models/piggybak/shipping_calculator/range.rb in piggybak-0.6.0
- old
+ new
@@ -1,8 +1,12 @@
module Piggybak
class ShippingCalculator::Range
KEYS = ["cost", "upper", "lower"]
+ def self.description
+ "Cost per Range"
+ end
+
def self.available?(method, object)
low_end = method.metadata.detect { |m| m.key == "lower" }.value
high_end = method.metadata.detect { |m| m.key == "upper" }.value
object.total >= low_end.to_f && object.total <= high_end.to_f