2010-09-09 18:19:35 +00:00
|
|
|
The const_missing trick
|
|
|
|
=======================
|
|
|
|
|
|
|
|
Metasm uses a ruby trick to load most of the framework on demand, so that
|
|
|
|
*e.g.* the `MIPS`-related classes are never loaded in the ruby interpreter
|
|
|
|
unless you use them.
|
|
|
|
|
2011-04-06 17:40:01 +00:00
|
|
|
It is setup by the top-level `metasm.rb` file, by using the ruby mechanism of
|
|
|
|
`Module.autoload`. This mechanism will automatically load the specified metasm
|
|
|
|
components whenever a reference is made to one of the constants listed here.
|
2010-09-09 18:19:35 +00:00
|
|
|
|
|
|
|
Metasm provides a replacement top-level file, `misc/metasm-all.rb`,
|
2011-04-06 17:40:01 +00:00
|
|
|
which will unconditionally load all metasm files.
|
|
|
|
This will not however load mutually exclusive files, like the Gui subsystems ;
|
|
|
|
in this case it will load only the autodetected gui module (win32 or gtk).
|
2010-09-09 18:19:35 +00:00
|
|
|
|