Module: ClusterFactory
- Included in:
- Geometry::Arc, Geometry::Circle, Geometry::Line, Geometry::Obround, Geometry::Rectangle, Geometry::RegularPolygon, Geometry::Rotation, Geometry::Triangle
- Defined in:
- lib/geometry/cluster_factory.rb
Overview
Include this module in the base class of a class cluster to handle swizzling of ::new
Class Method Summary collapse
Class Method Details
.included(parent) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/geometry/cluster_factory.rb', line 4 def self.included(parent) class << parent alias :original_new :new def inherited(subclass) class << subclass alias :new :original_new end end end end |