class Attributor::Symbol

Public Class Methods

example(_context = nil, options: {}) click to toggle source
# File lib/attributor/types/symbol.rb, line 15
def self.example(_context = nil, options: {})
  :example
end
family() click to toggle source
# File lib/attributor/types/symbol.rb, line 19
def self.family
  String.family
end
json_schema_type() click to toggle source
# File lib/attributor/types/symbol.rb, line 23
def self.json_schema_type
  :string
end
load(value, context = Attributor::DEFAULT_ROOT_CONTEXT, **options) click to toggle source
Calls superclass method
# File lib/attributor/types/symbol.rb, line 9
def self.load(value, context = Attributor::DEFAULT_ROOT_CONTEXT, **options)
  value.to_sym
rescue
  super
end
native_type() click to toggle source
# File lib/attributor/types/symbol.rb, line 5
def self.native_type
  ::Symbol
end