lib/cieloz/requisicao_tid.rb in cieloz-0.0.18 vs lib/cieloz/requisicao_tid.rb in cieloz-0.0.19

- old
+ new

@@ -28,10 +28,14 @@ def self.inherited(target) target.extend ClassMethods end - attr_accessor :valor + attr_reader :valor + + def valor=(val) + @valor = (val.nil? or val.integer?) ? val : (val * 100).round + end def attributes { tid: @tid, dados_ec: @dados_ec, valor: @valor } end end