Class: Ixtlan::Babel::AbstractFilter
- Inherits:
-
Object
- Object
- Ixtlan::Babel::AbstractFilter
- Defined in:
- lib/ixtlan/babel/abstract_filter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
26 27 28 |
# File 'lib/ixtlan/babel/abstract_filter.rb', line 26 def @options end |
Instance Method Details
#add_custom_serializers(map) ⇒ Object
32 33 34 |
# File 'lib/ixtlan/babel/abstract_filter.rb', line 32 def add_custom_serializers( map ) @map = map end |
#serialize(data) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/ixtlan/babel/abstract_filter.rb', line 36 def serialize( data ) if @map && ser = @map[ data.class.to_s ] ser.call(data) else data end end |