Sha256: a93639f48634bcf2a4944fcd0a083909684a9269a401a42e1fba670fc402017b

Contents?: true

Size: 309 Bytes

Versions: 13

Compression:

Stored size: 309 Bytes

Contents

class Numeric

  # Returns the size of the string representation of
  # a numerical value.
  #
  #      1.spacing   #=> 1
  #     10.spacing   #=> 2
  #    100.spacing   #=> 3
  #   -100.spacing   #=> 4
  #    1.2.spacing   #=> 3
  #
  # CREDIT: Victor H. Goff III

  def spacing
    to_s.length
  end

end


Version data entries

13 entries across 12 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 lib/core/facets/numeric/spacing.rb
facets-3.1.0 lib/core/facets/numeric/spacing.rb
facets-3.0.0 lib/core/facets/numeric/spacing.rb
facets-2.9.3 lib/core/facets/numeric/spacing.rb
facets-2.9.2 lib/core/facets/numeric/spacing.rb
facets-2.9.2 src/core/facets/numeric/spacing.rb
facets-2.9.1 lib/core/facets/numeric/spacing.rb
facets-2.9.0 lib/core/facets/numeric/spacing.rb
facets-2.9.0.pre.2 lib/core/facets/numeric/spacing.rb
facets-2.9.0.pre.1 lib/core/facets/numeric/spacing.rb
facets-2.8.4 lib/core/facets/numeric/spacing.rb
facets-2.8.3 lib/core/facets/numeric/spacing.rb
facets-2.8.2 lib/core/facets/numeric/spacing.rb