Sha256: 2f62c2fb72ac5e28553446b7947fc7987a61abfa72ee56c90c2cc865c1cdc7fb

Contents?: true

Size: 400 Bytes

Versions: 4

Compression:

Stored size: 400 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

4 entries across 4 versions & 1 rubygems

Version Path
object_identifier-0.0.4 lib/object_identifier/core_ext/symbol.rb
object_identifier-0.0.3 lib/object_identifier/core_ext/symbol.rb
object_identifier-0.0.2 lib/object_identifier/core_ext/symbol.rb
object_identifier-0.0.1 lib/object_identifier/core_ext/symbol.rb