Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/charlie/etc/monkey.rb
Instance Method Summary collapse
- #metaclass ⇒ Object
-
#name=(n) ⇒ Object
Used to give anonymous modules a name.
Instance Method Details
#metaclass ⇒ Object
119 120 121 |
# File 'lib/charlie/etc/monkey.rb', line 119 def class << self;self;end end |
#name=(n) ⇒ Object
Used to give anonymous modules a name.
124 125 126 |
# File 'lib/charlie/etc/monkey.rb', line 124 def name=(n) .class_eval{ define_method(:to_s){ n } } # avoid send for ruby 1.9 end |