Sha256: ab23718ce1bc268785ed759ff2bb8c618b6473d34368db7c430a292ab896130f

Contents?: true

Size: 367 Bytes

Versions: 2

Compression:

Stored size: 367 Bytes

Contents

require "bigdecimal"

class BigDecimal
  # Formats this BigDecimal as an object-type-revealing String.
  #
  # @return [String] a String representation of this BigDecimal object
  #
  # @example
  #   BigDecimal.new(1).inspect_lit          # => "<BD:1.0>"
  #   BigDecimal.new(99.999, 5).inspect_lit  # => "<BD:99.999>"
  def inspect_lit
    "<BD:#{self}>"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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