class GraphQL::Types::Float
Public Class Methods
coerce_input(value, _ctx)
click to toggle source
# File lib/graphql/types/float.rb, line 8 def self.coerce_input(value, _ctx) value.is_a?(Numeric) ? value.to_f : nil end
coerce_result(value, _ctx)
click to toggle source
# File lib/graphql/types/float.rb, line 12 def self.coerce_result(value, _ctx) value.to_f end