Parent

Methods

Class/Module Index [+]

Quicksearch

MCollective::Validator::Ipv4addressValidator

Public Class Methods

validate(validator) click to toggle source
# File lib/mcollective/validator/ipv4address_validator.rb, line 6
def self.validate(validator)
  begin
    ip = IPAddr.new(validator)
    raise ValidatorError, "value should be an ipv4 adddress" unless ip.ipv4?
  rescue
    raise ValidatorError, "value should be an ipv4 address"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.