Class: LanScanner::Device

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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_addressObject (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

#stateObject (readonly)

‘up’,‘down’,‘unknown’



6
7
8
# File 'lib/lan_scanner/device.rb', line 6

def state
  @state
end