Displaying 1 result from an estimated 1 matches for "this_short_filenam".
Did you mean:
this_short_filename
2011 Jul 21
0
Templates and self-knowledge
...sts, all of which do the same thing:
bring a value into the ERB scope as a named variable.
Of course, it just now occurred to me that I can create a define like this:
> define smart_template($module, $mode = 0644, $args = undef) {
>>
>> $this_filename = $name
>>
>> $this_short_filename = inline_template("<%=
>>> this_filename.split(/\//)[-1] %>")
>>
>> $template_file = "${module}/${this_short_filename}.erb"
>>
>> file{$name:
>>
>> content => template($template_file),
>>
>> mode =>...