Sha256: 2635d8278590f66d28d1379e92eae6d99124c42150172c429999ba413227336a

Contents?: true

Size: 298 Bytes

Versions: 3

Compression:

Stored size: 298 Bytes

Contents

require 'fiona7/attribute_readers/attribute_reader'

module Fiona7
  module AttributeReaders
    class NumberAsString < AttributeReader
      def call
        val = self.obj[self.attr_name]
        if val.blank?
          nil
        else
          val.to_f
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 lib/fiona7/attribute_readers/number_as_string.rb
infopark_fiona7-1.6.1.1.1 lib/fiona7/attribute_readers/number_as_string.rb
infopark_fiona7-1.6.1.1.0 lib/fiona7/attribute_readers/number_as_string.rb