Module: Instantiable
- Defined in:
- lib/standard/facets/instantiable.rb
Overview
Instantiable
Initialize modules, almost as if they were classes.
Alows a module to be used much like a class, by defining a #new method that creates a class on demand.
Class Method Summary collapse
Instance Method Summary collapse
-
#new(*args, &blk) ⇒ Object
Never use a class again! ;).
Class Method Details
.append_features(mod) ⇒ Object
10 11 12 |
# File 'lib/standard/facets/instantiable.rb', line 10 def self.append_features(mod) mod.extend self end |