Sha256: ee63ac2b3f18b5dc66475a62424d9b18ff9742dde61235407188b542b08ee1ee

Contents?: true

Size: 244 Bytes

Versions: 1

Compression:

Stored size: 244 Bytes

Contents

# frozen_string_literal: true

module Spout
  module Helpers
    module NumberHelper
      def number_with_delimiter(number, delimiter = ",")
        number.to_s.reverse.scan(/(?:\d*\.)?\d{1,3}-?/).join(",").reverse
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spout-0.13.0.beta1 lib/spout/helpers/number_helper.rb