module Nmapr::Options::Ports

Public Instance Methods

port(arg) click to toggle source
# File lib/nmapr/options/ports.rb, line 4
def port(arg)
  @ports << arg
end
port_ratio(value) click to toggle source
# File lib/nmapr/options/ports.rb, line 12
def port_ratio(value)
  add_argument("--port-ratio " << value.to_s)
end
ports(*args) click to toggle source
# File lib/nmapr/options/ports.rb, line 16
def ports(*args)
  args.each do |arg|
    case arg 
    when :common
      @ports << "1-1024"
    when :all
      @ports << "*"
    when :top
      add_argument("--top-ports")
    when Integer
      @ports << arg.to_s
    when String
      @ports << arg
    when Array
      ports(arg)
    end
  end
end
sequential() click to toggle source
# File lib/nmapr/options/ports.rb, line 8
def sequential
  add_argument("-r")
end