Module: URIScanner

Defined in:
lib/uri_scanner.rb,
lib/uri_scanner/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.is_ip_valid?(ip_addr) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/uri_scanner.rb', line 7

def is_ip_valid?(ip_addr)
  MachineIpAddr.new.is_valid? ip_addr
end

.parse_uri(data) ⇒ Object



11
12
13
# File 'lib/uri_scanner.rb', line 11

def parse_uri(data)
  MachineURI.new data
end

.scan(data) ⇒ Object



15
16
17
# File 'lib/uri_scanner.rb', line 15

def scan(data)
  MachineURIScanner.scan data
end

.scan_and_parse(data) ⇒ Object



19
20
21
# File 'lib/uri_scanner.rb', line 19

def scan_and_parse(data)
  MachineURIScanner.scan data, true
end