Sha256: 888dbe012b16d8d9fd533298293b83119b60fd14f6f0310dc36d3b4b5859c73e

Contents?: true

Size: 432 Bytes

Versions: 2

Compression:

Stored size: 432 Bytes

Contents

class String
  # Formats self to look like a String literal so that object type will be
  # inherently obvious when inspected.
  #
  # @return [String] a String-literal representation of this object
  #
  # @example
  #   "test".inspect_lit  # => "\"test\"" (i.e. '"test"')
  #   "1".inspect_lit     # => "\"1\""    (i.e. '"1"')
  #   "12.3".inspect_lit  # => "\"12.3\"" (i.e. '"12.3"')
  def inspect_lit
    %("#{to_s}")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
object_identifier-0.1.1 lib/object_identifier/core_ext/string.rb
object_identifier-0.1.0 lib/object_identifier/core_ext/string.rb