Sha256: 584a823ef7b4c5213dbcfce3f9bca27cd753f14b967bda55cfe8982d691d3432
Contents?: true
Size: 414 Bytes
Versions: 16
Compression:
Stored size: 414 Bytes
Contents
# -*- encoding: utf-8 -*- # 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
16 entries across 16 versions & 1 rubygems