Class: Alias
Constant Summary
Constants inherited from ErbPP
Instance Method Summary collapse
- #code ⇒ Object
- #definition ⇒ Object
-
#initialize(parent, dst, src) ⇒ Alias
constructor
A new instance of Alias.
Methods inherited from ErbPP
#attr_method, #attrs, #check_params, define_attrs, #has_attr?, #load_erb, #method_missing, #method_missing_alias, #parents, #result, #run, #search_method_in_parents
Constructor Details
#initialize(parent, dst, src) ⇒ Alias
Returns a new instance of Alias.
257 258 259 260 261 262 |
# File 'lib/erbpp.rb', line 257 def initialize(parent, dst, src) super(parent,nil) @dst = dst @src = src Function::DEFS.push(self) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ErbPP
Instance Method Details
#code ⇒ Object
264 265 266 |
# File 'lib/erbpp.rb', line 264 def code nil end |
#definition ⇒ Object
268 269 270 |
# File 'lib/erbpp.rb', line 268 def definition "rb_define_alias(#{mod_var}, \"#{dst}\", \"#{src}\");" end |