Module: Pcapz

Defined in:
lib/pcapz.rb,
lib/pcapz/version.rb,
lib/pcapz/capture_types/bsd.rb,
lib/pcapz/capture_types/linux.rb

Defined Under Namespace

Modules: Capture

Constant Summary collapse

VERSION =
"1.0.1"

Class Method Summary collapse

Class Method Details

.captureObject



6
7
8
9
10
11
12
13
14
# File 'lib/pcapz.rb', line 6

def self.capture
  if RUBY_PLATFORM =~ /linux/
    return Capture::Linux
  elsif  RUBY_PLATFORM =~ /darwin|freebsd|netbsd/
    return Capture::BSD
  else
    raise "This platform #{RUBY_PLATFORM} is not yet supported!"
  end
end