Sha256: 51cf2b20746adbdab6cb15de46e509392885153250e9f9fce684b7824dad42a1
Contents?: true
Size: 702 Bytes
Versions: 1
Compression:
Stored size: 702 Bytes
Contents
module Shapeshifter class Shifter attr_reader :source_object def initialize(source_object) @source_object = source_object end class << self def chain(shifter) ShiftChain.new(self).chain(shifter) end def shift(source_object, target_object) ShiftChain.new(self).shift(source_object, target_object) end def revert(source_object, target_object) ShiftChain.new(self).revert(source_object, target_object) end end # :nocov: def shift(_) raise NoMethodError.new('Should be overridden') end def revert(_) raise NoMethodError.new('Should be overridden') end # :nocov: end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shapeshifter-0.0.2 | lib/shapeshifter/shifter.rb |