Class: Amrita2::Filters::FunctionFilter
- Defined in:
- lib/amrita2/template.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(sym, *args) ⇒ FunctionFilter
constructor
A new instance of FunctionFilter.
- #value_filter_code(de, cg, element) ⇒ Object
Methods inherited from Base
filter_method, inherited, #parse_filter_a, #|
Constructor Details
#initialize(sym, *args) ⇒ FunctionFilter
Returns a new instance of FunctionFilter.
2448 2449 2450 |
# File 'lib/amrita2/template.rb', line 2448 def initialize(sym, *args) @sym, @args = sym, args end |
Instance Method Details
#value_filter_code(de, cg, element) ⇒ Object
2452 2453 2454 2455 |
# File 'lib/amrita2/template.rb', line 2452 def value_filter_code(de, cg, element) cg.code("$_ = $_.send(#{@sym.inspect}, *#{@args.inspect})") super end |