Module: Hornetseye::MultiArrayConstructor
- Included in:
- MultiArray, Sequence
- Defined in:
- lib/multiarray/shortcuts.rb
Overview
Module with meta-programming methods for creating constructor shortcut methods
Class Method Summary collapse
-
.constructor_shortcut(target) ⇒ Proc
Meta-programming method for creating constructor shortcut methods.
Class Method Details
.constructor_shortcut(target) ⇒ Proc
Meta-programming method for creating constructor shortcut methods
30 31 32 33 34 |
# File 'lib/multiarray/shortcuts.rb', line 30 def constructor_shortcut( target ) define_method target.to_s.downcase do |*args| new target, *args end end |