Module: ChiliProject::Liquid::LiquidExt::Strainer

Defined in:
lib/chili_project/liquid/liquid_ext/strainer.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/chili_project/liquid/liquid_ext/strainer.rb', line 20

def self.included(base)
  base.extend(ClassMethods)

  base.class_attribute :filters, :instance_reader => false, :instance_writer => false
  base.class_eval do
    self.filters = base.send(:class_variable_get, '@@filters').values

    class << self
      alias_method_chain :global_filter, :filter_array
      alias_method_chain :create, :filter_array
    end
  end
end