Sha256: c416aa1ce281585d7e4394320e4a232759a5535b84360a1bc97bcf51dd894fc4
Contents?: true
Size: 388 Bytes
Versions: 26
Compression:
Stored size: 388 Bytes
Contents
require_dependency 'spree/calculator' module Spree class Calculator::FlatRate < Calculator preference :amount, :decimal, default: 0 preference :currency, :string, default: ->{ Spree::Config[:currency] } def compute(object = nil) if object && preferred_currency.casecmp(object.currency).zero? preferred_amount else 0 end end end end
Version data entries
26 entries across 26 versions & 1 rubygems