lib/yzz.rb in yzz-2.1.0 vs lib/yzz.rb in yzz-2.1.1

- old
+ new

@@ -58,19 +58,27 @@ Hash.new { |ꜧ, missing_dimension| ꜧ[ missing_dimension ] = Class.new SidePair() do include ::Yzz.Dimension missing_dimension # ::Yzz just in case end.new }.tap { |ꜧ| define_singleton_method :zz_dimensions do ꜧ end } + # TODO: This second subclassing of SidePair() in effect acts as a + # singleton class. How about making it a true singleton class and + # just extending the objects with the mixin? end # A reader method that returns a parametrized subclass of Yzz::SidePair. This # reader subsequently redefines itself (shadows itself with a newly defined # singleton method) so as to always simply return the same parametrized # subclass. # def SidePair SidePair.parametrize( zz: self ) .tap { |ç| define_singleton_method :SidePair do ç end } + # TODO: How about + # + # SidePair.parametrize zz: self do + # def SidePair; self end + # end end # Returns a SidePair instance along the requested dimension. # def along dimension