Class: Ixtlan::Babel::ModelFilter

Inherits:
AbstractFilter show all
Defined in:
lib/ixtlan/babel/model_filter.rb

Instance Attribute Summary

Attributes inherited from AbstractFilter

#options

Instance Method Summary collapse

Methods inherited from AbstractFilter

#add_custom_serializers, #serialize

Instance Method Details

#filter(model, &block) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/ixtlan/babel/model_filter.rb', line 26

def filter( model, &block )
  if model
    data = block.call( model )
    filter_data( model, data,
                 Context.new( options ),
                 &block ) 
  end
end