class Attrio::Types::Float

Public Class Methods

typecast(value, options = {}) click to toggle source
# File lib/attrio/types/float.rb, line 6
def self.typecast(value, options = {})
  begin
    value.to_f
  rescue NoMethodError => e
    nil
  end
end
typecasted?(value, options = {}) click to toggle source
# File lib/attrio/types/float.rb, line 14
def self.typecasted?(value, options = {})
  value.is_a? ::Float
end