Class: DefError
Instance Attribute Summary
Attributes inherited from ErbPP
Instance Method Summary collapse
- #init_def ⇒ Object
-
#initialize(parent, name, sup_var, **opts, &block) ⇒ DefError
constructor
A new instance of DefError.
- #result ⇒ Object
Methods inherited from ErbPP
#add_child, #description, #find, #find_tmpl, #get, #load_erb, #method_missing, #method_missing_alias, #run, #set, #write
Constructor Details
#initialize(parent, name, sup_var, **opts, &block) ⇒ DefError
Returns a new instance of DefError.
313 314 315 316 |
# File 'ext/numo/narray/gen/erbpp2.rb', line 313 def initialize(parent, name, sup_var, **opts, &block) super(parent, error_name:name, error_var:"e"+name, super_var:sup_var, **opts, &block) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ErbPP
Instance Method Details
#init_def ⇒ Object
320 321 322 323 |
# File 'ext/numo/narray/gen/erbpp2.rb', line 320 def init_def "/*#{description}*/ #{error_var} = rb_define_class_under(#{ns_var},\"#{error_name}\",#{super_var});" end |
#result ⇒ Object
317 318 319 |
# File 'ext/numo/narray/gen/erbpp2.rb', line 317 def result "static VALUE #{error_var};" end |