Module: AutoloadPatch

Included in:
NMatrix::IO, NMatrix::IO::Matlab
Defined in:
lib/nmatrix/monkeys.rb

Overview

Since ‘autoload` will most likely be deprecated (due to multi-threading concerns), we’ll use ‘const_missing`. See: www.ruby-forum.com/topic/3036681 for more info.

Instance Method Summary collapse

Instance Method Details

#const_missing(name) ⇒ Object

:nodoc



133
134
135
136
137
138
# File 'lib/nmatrix/monkeys.rb', line 133

def const_missing(name)
  file = name.to_s.underscore
  require "nmatrix/io/#{file}"
  klass = const_get(name)
  return klass if klass
end