method

valid_v4?

Importance_0
v1_9_1_378 - Show latest stable - 0 notes - Class: IPSocket
valid_v4?(addr) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/ipaddr.rb, line 26
    def valid_v4?(addr)
      if /\A(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\Z/ =~ addr
        return $~.captures.all? {|i| i.to_i < 256}
      end
      return false
    end
Register or log in to add new notes.