lib/rails/graphql/type/enum.rb
# Transforms the given value to its representation in a Hash object
Transforms the given value to its representation in a Hash object
Transforms the given value to its representation in a Hash object
def as_json(value)
            return if value.nil?
            return value.to_s if value.is_a?(self)
            return all_values.drop(value).first if indexed? && value.is_a?(Numeric)
            value.to_s.underscore.upcase
          end
def as_json ( value ) return if value . nil? return value . to_s if value . is_a? ( self ) return all_values . drop ( value ) . first if indexed? && value . is_a? ( Numeric ) value . to_s . underscore . upcase end
Transforms the given value to its representation in a Hash object
Transforms the given value to its representation in a Hash object
value