Module: Kernel
- Defined in:
- lib/autoload.rb
Instance Method Summary collapse
-
#autoload(cname, path) ⇒ String
Instance level autoload method.
Instance Method Details
#autoload(cname, path) ⇒ String
Instance level autoload method.
Note: I am not so certain the instance level method is a good idea. The end used can just as easily and more cleary use ‘self.class.autoload` to do it themselves. Nonetheless, Ruby supported this so we will too.
35 36 37 |
# File 'lib/autoload.rb', line 35 def autoload(cname, path) $AUTOLOAD[[self.class, cname.to_sym]] << path end |