Class: Hps::HpsInputValidation
- Inherits:
-
Object
- Object
- Hps::HpsInputValidation
- Defined in:
- lib/hps/infrastructure/hps_input_validation.rb
Class Method Summary collapse
Class Method Details
.check_amount(amount) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/hps/infrastructure/hps_input_validation.rb', line 3 def self.check_amount(amount) if amount < 0 || amount == nil raise InvalidRequestException end return amount if amount.is_a? Float amount.gsub(/[^0-9\.]/, '') end |