Sha256: 342e8b985c28114053afebb92c865ff13fb58779697d3e91eba71ff28a441f03

Contents?: true

Size: 426 Bytes

Versions: 2

Compression:

Stored size: 426 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true

module Mixture
  module Types
    # A symbol.  Don't really use this for coercion; in Ruby 2.2.2,
    # they added garbage collection for symbols; however, it is still
    # not a brilliant idea to turn user input into symbols.
    class Symbol < Object
      register
      options[:primitive] = ::Symbol
      options[:method] = :to_symbol
      as :symbol
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mixture-0.7.1 lib/mixture/types/symbol.rb
mixture-0.7.0 lib/mixture/types/symbol.rb