Class: Stix2::Validators::Hex

Inherits:
Object
  • Object
show all
Defined in:
lib/stix2/validators/hex.rb

Instance Method Summary collapse

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