Class: DefClass
- Defined in:
- ext/numo/narray/gen/erbpp2.rb
Constant Summary
Constants inherited from ErbPP
Instance Attribute Summary
Attributes inherited from ErbPP
Instance Method Summary collapse
- #_mod_var ⇒ Object
- #free_func ⇒ Object
- #init_erb ⇒ Object
-
#initialize(parent, **opts, &block) ⇒ DefClass
constructor
A new instance of DefClass.
- #super_class ⇒ Object
Methods inherited from DefModule
#def_id, #id_list, #init_def, #method_code
Methods included from DeclMethod
#def_alias, #def_alloc_func, #def_const, #def_method, #def_module_function, #def_singleton_method, #undef_alloc_func, #undef_method, #undef_singleton_method
Methods inherited from ErbPP
#add_child, #attr_method, #attrs, #check_params, define_attrs, #description, #find, #find_tmpl, #get, #has_attr?, #init_def, #load_erb, #method_missing, #method_missing_alias, #parents, #result, #run, #search_method_in_parents, #set, #write
Constructor Details
#initialize(parent, **opts, &block) ⇒ DefClass
Returns a new instance of DefClass.
191 192 193 194 |
# File 'ext/numo/narray/gen/erbpp2.rb', line 191 def initialize(parent, **opts, &block) eb = opts[:erb_base] || 'class' super(parent, erb_base:eb, **opts, &block) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ErbPP
Instance Method Details
#_mod_var ⇒ Object
195 196 197 |
# File 'ext/numo/narray/gen/erbpp2.rb', line 195 def _mod_var @opts[:class_var] end |
#free_func ⇒ Object
204 205 206 |
# File 'ext/numo/narray/gen/erbpp2.rb', line 204 def free_func @opts[:free_func] || "gsl_"+get(:name)+"_free" end |
#init_erb ⇒ Object
198 199 200 |
# File 'ext/numo/narray/gen/erbpp2.rb', line 198 def init_erb @opts[:init_erb] || "init_class" end |
#super_class ⇒ Object
201 202 203 |
# File 'ext/numo/narray/gen/erbpp2.rb', line 201 def super_class @opts[:super_class] || "rb_cObject" end |