Class: Const
Constant Summary
Constants inherited from ErbPP
Instance Attribute Summary
Attributes inherited from ErbPP
Instance Method Summary collapse
- #code ⇒ Object
- #definition ⇒ Object
-
#initialize(parent, name, value, desc) ⇒ Const
constructor
A new instance of Const.
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
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ErbPP
Instance Method Details
#code ⇒ Object
286 287 288 |
# File 'lib/erbpp.rb', line 286 def code nil end |
#definition ⇒ Object
290 291 292 293 |
# File 'lib/erbpp.rb', line 290 def definition "/*"+desc+"*/\n "+ "rb_define_const(#{mod_var},\"#{name}\",#{value});" end |