Class: Capturing::Exec

Inherits:
Object
  • Object
show all
Defined in:
lib/capture.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(device: "eth0", max_bytes: 1048576, timeout: 1000, port: 24224, logger: nil) ⇒ Exec

Returns a new instance of Exec.



127
128
129
130
131
132
133
# File 'lib/capture.rb', line 127

def initialize(device: "eth0", max_bytes: 1048576, timeout: 1000, port: 24224, logger: nil)
  @device = device
  @max_bytes = max_bytes
  @timeout = timeout
  @port = port
  @logger = logger
end

Instance Attribute Details

#deviceObject (readonly)

Returns the value of attribute device.



123
124
125
# File 'lib/capture.rb', line 123

def device
  @device
end

#max_bytesObject (readonly)

Returns the value of attribute max_bytes.



123
124
125
# File 'lib/capture.rb', line 123

def max_bytes
  @max_bytes
end

#portObject (readonly)

Returns the value of attribute port.



123
124
125
# File 'lib/capture.rb', line 123

def port
  @port
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



123
124
125
# File 'lib/capture.rb', line 123

def timeout
  @timeout
end

Instance Method Details

#loggerObject



135
136
137
# File 'lib/capture.rb', line 135

def logger
  @logger.nil? ? DEFAULT_LOGGER : @logger
end