Class: Stix2::Validators::Hex
- Inherits:
-
Object
- Object
- Stix2::Validators::Hex
- Defined in:
- lib/stix2/validators/hex.rb
Instance Method Summary collapse
-
#initialize(value) ⇒ Hex
constructor
A new instance of Hex.
Constructor Details
#initialize(value) ⇒ Hex
Returns a new instance of Hex.
4 5 6 7 |
# File 'lib/stix2/validators/hex.rb', line 4 def initialize(value) return if !value value.match?(/^\h*$/) || raise(Exception::InvalidValues.new(value)) end |