Sha256: dbf6a5ecf5000826f3a67e2c66b10f92c7f5b4ee5e0490d1fda261fdfe3948a0

Contents?: true

Size: 118 Bytes

Versions: 4

Compression:

Stored size: 118 Bytes

Contents

# frozen_string_literal: true

class Float
  def trim
    i = to_i
    f = to_f
    i == f ? i : f.round(1)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
simple_request-0.1.5 lib/simple_helper/float/trim.rb
simple_request-0.1.4 lib/simple_helper/float/trim.rb
simple_request-0.1.3 lib/simple_helper/float/trim.rb
simple_request-0.1.2 lib/simple_helper/float/trim.rb