Class: RowBoat::ValueConverter Private

Inherits:
Object
  • Object
show all
Defined in:
lib/row_boat/value_converter.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ ValueConverter

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ValueConverter.



8
9
10
# File 'lib/row_boat/value_converter.rb', line 8

def initialize(&block)
  @converter = block
end

Instance Attribute Details

#converterObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
# File 'lib/row_boat/value_converter.rb', line 6

def converter
  @converter
end

Instance Method Details

#convert(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
# File 'lib/row_boat/value_converter.rb', line 12

def convert(value)
  converter.call(value)
end