Class: Amrita2::Filters::ModuleExtendFilter

Inherits:
Base
  • Object
show all
Defined in:
lib/amrita2/template.rb

Instance Attribute Summary

Attributes inherited from Base

#next_

Instance Method Summary collapse

Methods inherited from Base

filter_method, inherited, #parse_filter_a, #|

Constructor Details

#initialize(mod) ⇒ ModuleExtendFilter

Returns a new instance of ModuleExtendFilter.



2555
2556
2557
# File 'lib/amrita2/template.rb', line 2555

def initialize(mod)
  @mod = mod
end

Instance Method Details

#value_filter_code(de, cg, element) ⇒ Object



2559
2560
2561
2562
# File 'lib/amrita2/template.rb', line 2559

def value_filter_code(de, cg, element)
  cg.code("$_.extend(#@mod)")
  super
end