Class: Ruby2CExtension::Plugin
- Inherits:
-
Object
- Object
- Ruby2CExtension::Plugin
- Defined in:
- lib/ruby2cext/plugin.rb
Direct Known Subclasses
Ruby2CExtension::Plugins::CaseOptimize, Ruby2CExtension::Plugins::ConstCache, Ruby2CExtension::Plugins::InlineMethods, Ruby2CExtension::Plugins::RequireInclude, Ruby2CExtension::Plugins::Warnings
Instance Attribute Summary collapse
-
#compiler ⇒ Object
readonly
Returns the value of attribute compiler.
Instance Method Summary collapse
-
#global_c_code ⇒ Object
C code returned by this method will be inserted into the final C file between the helpers and the C functions.
-
#init_c_code ⇒ Object
C code returned by this method will be inserted into the Init_*() function before the calling of the toplevel scopes.
-
#initialize(compiler) ⇒ Plugin
constructor
A new instance of Plugin.
Constructor Details
#initialize(compiler) ⇒ Plugin
Returns a new instance of Plugin.
7 8 9 |
# File 'lib/ruby2cext/plugin.rb', line 7 def initialize(compiler) @compiler = compiler end |
Instance Attribute Details
#compiler ⇒ Object (readonly)
Returns the value of attribute compiler.
5 6 7 |
# File 'lib/ruby2cext/plugin.rb', line 5 def compiler @compiler end |
Instance Method Details
#global_c_code ⇒ Object
C code returned by this method will be inserted into the final C file between the helpers and the C functions
13 14 15 |
# File 'lib/ruby2cext/plugin.rb', line 13 def global_c_code nil end |
#init_c_code ⇒ Object
C code returned by this method will be inserted into the Init_*() function before the calling of the toplevel scopes
19 20 21 |
# File 'lib/ruby2cext/plugin.rb', line 19 def init_c_code nil end |