class MCollective::Validator::Ipv4addressValidator - mcollective version 2.12.5

# class MCollective::Validator::Ipv4addressValidator

### Public Class Methods

validate(validator) click to toggle source

       # File lib/mcollective/validator/ipv4address_validator.rb
     6 def self.validate(validator)
     7   begin
     8     ip = IPAddr.new(validator)
     9     raise ValidatorError, "value should be an ipv4 adddress" unless ip.ipv4?
    10   rescue
    11     raise ValidatorError, "value should be an ipv4 address"
    12   end
    13 end