Sha256: 47064a47037eb4b0c2aaf764c350bc2c156a1f730a5218377892569faca7dc3a
Contents?: true
Size: 473 Bytes
Versions: 1
Compression:
Stored size: 473 Bytes
Contents
module Prezzo module Calculator def self.included(base) base.class_eval do base.include(ParamsDSL) base.include(ComponentsDSL) base.include(TransientDSL) base.include(Explainable) end end def initialize(context = {}) @context = context end def calculate @total ||= formula end def formula raise "Formula not implemented" end private attr_reader :context end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
prezzo-1.0.0.pre.rc | lib/prezzo/calculator.rb |