Sha256: 27bf0aad4b91b30a8c85d71c1030dbd8429750289bb3519f24ee0da6ea67dada
Contents?: true
Size: 416 Bytes
Versions: 5
Compression:
Stored size: 416 Bytes
Contents
# frozen_string_literal: true module Brcobranca module Limpeza # Transforma Float em String preservando o zero a direita. # # @return [String] # @example # 1.9 #=> 190 # 1.93 #=> 193 def limpa_valor_moeda inicio, fim = to_s.split('.') (inicio + fim.ljust(2, '0')) end end end [Float, String].each do |klass| klass.class_eval { include Brcobranca::Limpeza } end
Version data entries
5 entries across 5 versions & 2 rubygems