Class: LanScanner::Device
- Inherits:
-
Object
- Object
- LanScanner::Device
- Defined in:
- lib/lan_scanner/device.rb
Instance Attribute Summary collapse
-
#host_name ⇒ Object
readonly
Returns the value of attribute host_name.
-
#remote_address ⇒ Object
readonly
Returns the value of attribute remote_address.
-
#state ⇒ Object
readonly
‘up’,‘down’,‘unknown’.
Instance Method Summary collapse
-
#initialize(remote_address:, host_name: nil, state: nil) ⇒ Device
constructor
A new instance of Device.
Constructor Details
#initialize(remote_address:, host_name: nil, state: nil) ⇒ Device
Returns a new instance of Device.
8 9 10 11 12 |
# File 'lib/lan_scanner/device.rb', line 8 def initialize(remote_address:, host_name: nil, state: nil) @host_name = host_name @remote_address = remote_address @state = state end |
Instance Attribute Details
#host_name ⇒ Object (readonly)
Returns the value of attribute host_name.
4 5 6 |
# File 'lib/lan_scanner/device.rb', line 4 def host_name @host_name end |
#remote_address ⇒ Object (readonly)
Returns the value of attribute remote_address.
5 6 7 |
# File 'lib/lan_scanner/device.rb', line 5 def remote_address @remote_address end |
#state ⇒ Object (readonly)
‘up’,‘down’,‘unknown’
6 7 8 |
# File 'lib/lan_scanner/device.rb', line 6 def state @state end |