Sha256: 20cfad350f4daf6f29fbc31e6afa262b81a5803135d2ba96e8787f0d8804ed07
Contents?: true
Size: 731 Bytes
Versions: 9
Compression:
Stored size: 731 Bytes
Contents
module Comable module PaymentProvider class Base class << self def name_symbol name.demodulize.underscore.to_sym end def display_name please_implement_method end def kind please_implement_method end def authorize! true end def complete! true end def cancel! true end def resume! true end private def please_implement_method calling_method_name = caller_locations(1, 1).first.label fail "You should implement '#{calling_method_name}' method in #{name}." end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems