Sha256: 97333b4621902a41c3950396351fe22cd5ed185e3113a4a25e9045b511272f2e

Contents?: true

Size: 189 Bytes

Versions: 2

Compression:

Stored size: 189 Bytes

Contents

# frozen_string_literal: true

class Object
  # @return [Symbol]
  def to_sym_by_eac
    return self if is_a?(::Symbol)
    return to_sym if respond_to?(:to_sym)

    to_s.to_sym
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
eac_ruby_utils-0.124.0 lib/eac_ruby_utils/patches/object/to_sym_by_eac.rb
eac_tools-0.97.2 sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_sym_by_eac.rb