Class: DataMetaDom::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/dataMetaDom/converter.rb

Overview

Converter class definition, see implementations:

  • INTEGRAL_CONV

  • FRACT_CONV

  • BOOL_CONV

  • DTTM_CONV

  • TEXT_CONV

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(serialize, deserialize) ⇒ Converter

Creates an instance with the given parameters, two lambdas, see ser and deser properties for details.



36
# File 'lib/dataMetaDom/converter.rb', line 36

def initialize(serialize, deserialize); @ser = serialize; @deser = deserialize end

Instance Attribute Details

#deserObject (readonly)

Lambda converting from a textual to matching data type.



31
32
33
# File 'lib/dataMetaDom/converter.rb', line 31

def deser
  @deser
end

#serObject (readonly)

Lambda converting from a data type to matching textual.



26
27
28
# File 'lib/dataMetaDom/converter.rb', line 26

def ser
  @ser
end