Class: SubnetFormatValidator

Inherits:
ActiveModel::Validator
  • Object
show all
Defined in:
lib/subnet_format/subnet_format_validator.rb

Instance Method Summary collapse

Instance Method Details

#validate(record) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/subnet_format/subnet_format_validator.rb', line 4

def validate(record)
  @record = record

  validate_dhcp_range
rescue ArgumentError
  ip_argument_error
end