Module: Iudex::Filter

Included in:
FilterBase
Defined in:
lib/iudex-filter.rb,
lib/iudex-filter/base.rb,
lib/iudex-filter/filter_base.rb,
lib/iudex-filter/proc_filter.rb,
lib/iudex-filter/by_filter_logger.rb,
lib/iudex-filter/filter_chain_factory.rb,
lib/iudex-filter/key_helper.rb

Defined Under Namespace

Modules: Core, KeyHelper Classes: FilterBase, ProcFilter

Constant Summary collapse

VERSION =
'1.7.0'
LIB_DIR =

:nodoc:

File.dirname( __FILE__ )

Instance Method Summary collapse

Instance Method Details

#fltr(opts = {}, &block) ⇒ Object

Short hand for ProcFilter.new( opts, &block )



22
23
24
# File 'lib/iudex-filter/proc_filter.rb', line 22

def fltr( opts = {}, &block )
  ProcFilter.new( { :caller => caller.first }.merge( opts ), &block )
end

#fltr_method(method_symbol, opts = {}) ⇒ Object

Return a Procfilter using method( map ) identified by method_symbol in self’s scope as filter. The default :desc is [ method_symbol ].



28
29
30
31
# File 'lib/iudex-filter/proc_filter.rb', line 28

def fltr_method( method_symbol, opts = {} )
  ProcFilter.new( { :desc => [ method_symbol ] }.merge( opts ),
                  &( method method_symbol ) )
end