Class: Monerorequest::MoneroPaymentID
- Inherits:
-
Object
- Object
- Monerorequest::MoneroPaymentID
- Defined in:
- lib/monerorequest/monero_payment_id.rb
Overview
provide a validator for a Monero Payment ID
Class Method Summary collapse
Class Method Details
.valid?(payment_id) ⇒ Boolean
6 7 8 9 10 11 12 |
# File 'lib/monerorequest/monero_payment_id.rb', line 6 def self.valid?(payment_id) return false unless payment_id.is_a?(String) return false unless payment_id.length == 16 return false unless payment_id =~ /[0-9a-f]/ true end |