Class: Fabulator::Core::Structurals::Filter
- Inherits:
-
Action
- Object
- Action
- Fabulator::Core::Structurals::Filter
- Defined in:
- lib/fabulator/core/structurals/filter.rb
Instance Method Summary collapse
Instance Method Details
#run(context) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/fabulator/core/structurals/filter.rb', line 8 def run(context) filtered = [ ] @context.with(context) do |ctx| filter_type = @name.split(/:/,2) ns = nil name = nil if filter_type.size == 2 ns = @context.get_ns(filter_type[0]) name = filter_type[1] else ns = FAB_NS name = filter_type[0] end ctx.run_filter(ns, name) filtered << ctx.root.path end return filtered end |