Class: RowBoat::ValueConverter Private
- Inherits:
-
Object
- Object
- RowBoat::ValueConverter
- 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
- #converter ⇒ Object readonly private
Instance Method Summary collapse
- #convert(value) ⇒ Object private
-
#initialize(&block) ⇒ ValueConverter
constructor
private
A new instance of ValueConverter.
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
#converter ⇒ Object (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 |