Sha256: 747cb9ed19539a1af5666f2faf8dc4866ba0c1eae5e43ef14e2cf32aae7ca587

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

class Symbol
  # Formats this symbol to look like a symbol literal so that object type will
  # be inherently obvious when used in logging methods, etc.
  #
  # @return [String] a symbol literal representation of this object
  #
  # @example
  #   :test.inspect_lit     # => ":\"test\"" (or ':"test"')
  #   :"ta-da!".inspect_lit # => ":\"ta-da!\"" (or ':"ta-da!"')
  def inspect_lit
    %(:"#{to_s}")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
object_identifier-0.0.6 lib/object_identifier/core_ext/symbol.rb
object_identifier-0.0.5 lib/object_identifier/core_ext/symbol.rb