Module: Liquid::StrainerFactory

Extended by:
StrainerFactory
Included in:
StrainerFactory
Defined in:
lib/liquid/strainer_factory.rb

Overview

StrainerFactory is the factory for the filters system.

Constant Summary collapse

GlobalCache =
Class.new(StrainerTemplate)

Instance Method Summary collapse

Instance Method Details

#add_global_filter(filter) ⇒ Object



8
9
10
11
# File 'lib/liquid/strainer_factory.rb', line 8

def add_global_filter(filter)
  strainer_class_cache.clear
  GlobalCache.add_filter(filter)
end

#create(context, filters = []) ⇒ Object



13
14
15
# File 'lib/liquid/strainer_factory.rb', line 13

def create(context, filters = [])
  strainer_from_cache(filters).new(context)
end

#global_filter_namesObject



17
18
19
# File 'lib/liquid/strainer_factory.rb', line 17

def global_filter_names
  GlobalCache.filter_method_names
end