Sha256: 55d7ee6f4f136a1e5d545b4874b8df7b22f571c6f4405652f163f2b84f396b05

Contents?: true

Size: 301 Bytes

Versions: 14

Compression:

Stored size: 301 Bytes

Contents

# frozen_string_literal: true

module Sail
  module Types
    # Float
    #
    # The Float type manipulates the
    # saved string value into floats.
    class Float < Type
      def to_value
        @setting.value.to_f
      end

      def from(value)
        value.to_f
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sail-3.6.1 lib/sail/types/float.rb
sail-3.6.0 lib/sail/types/float.rb
sail-3.5.1 lib/sail/types/float.rb
sail-3.5.0 lib/sail/types/float.rb
sail-3.4.0 lib/sail/types/float.rb
sail-3.3.0 lib/sail/types/float.rb
sail-3.2.4 lib/sail/types/float.rb
sail-3.2.3 lib/sail/types/float.rb
sail-3.2.2 lib/sail/types/float.rb
sail-3.2.1 lib/sail/types/float.rb
sail-3.2.0 lib/sail/types/float.rb
sail-3.1.0 lib/sail/types/float.rb
sail-3.0.1 lib/sail/types/float.rb
sail-3.0.0 lib/sail/types/float.rb