Sha256: d2c7afea037e08828dcab25b85d89376d641ba33c11d3d5ee75ac291460ac909

Contents?: true

Size: 370 Bytes

Versions: 10

Compression:

Stored size: 370 Bytes

Contents

module Attributor
  class Symbol
    include Type

    def self.native_type
      return ::Symbol
    end


    def self.load(value,context=Attributor::DEFAULT_ROOT_CONTEXT, **options)
      value.to_sym
    rescue
      super
    end

    def self.example(context=nil, options:{})
      :example
    end

    def self.family
      String.family
    end
    
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
attributor-5.0.2 lib/attributor/types/symbol.rb
attributor-5.0.1 lib/attributor/types/symbol.rb
attributor-5.0 lib/attributor/types/symbol.rb
attributor-4.2.0 lib/attributor/types/symbol.rb
attributor-4.1.0 lib/attributor/types/symbol.rb
attributor-4.0.1 lib/attributor/types/symbol.rb
attributor-4.0.0 lib/attributor/types/symbol.rb
attributor-3.0.1 lib/attributor/types/symbol.rb
attributor-3.0 lib/attributor/types/symbol.rb
attributor-2.6.1 lib/attributor/types/symbol.rb