Class: Capturing::Exec
- Inherits:
-
Object
- Object
- Capturing::Exec
- Defined in:
- lib/capture.rb
Instance Attribute Summary collapse
-
#device ⇒ Object
readonly
Returns the value of attribute device.
-
#max_bytes ⇒ Object
readonly
Returns the value of attribute max_bytes.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(device: "eth0", max_bytes: 1048576, timeout: 1000, port: 24224, logger: nil) ⇒ Exec
constructor
A new instance of Exec.
- #logger ⇒ Object
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
#device ⇒ Object (readonly)
Returns the value of attribute device.
123 124 125 |
# File 'lib/capture.rb', line 123 def device @device end |
#max_bytes ⇒ Object (readonly)
Returns the value of attribute max_bytes.
123 124 125 |
# File 'lib/capture.rb', line 123 def max_bytes @max_bytes end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
123 124 125 |
# File 'lib/capture.rb', line 123 def port @port end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
123 124 125 |
# File 'lib/capture.rb', line 123 def timeout @timeout end |
Instance Method Details
#logger ⇒ Object
135 136 137 |
# File 'lib/capture.rb', line 135 def logger @logger.nil? ? DEFAULT_LOGGER : @logger end |