Class: TrafficControl::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Client

Returns a new instance of Client.



5
6
7
# File 'lib/traffic_control/client.rb', line 5

def initialize(attributes)
  @mac, @ip, @client_id, @lease_time = attributes["dhcpPhysAddress"], attributes["dhcpIpAddress"], attributes["dhcpClientID"], attributes["dhcpLeaseTime"]
end

Instance Attribute Details

#client_idObject

Returns the value of attribute client_id.



3
4
5
# File 'lib/traffic_control/client.rb', line 3

def client_id
  @client_id
end

#ipObject

Returns the value of attribute ip.



3
4
5
# File 'lib/traffic_control/client.rb', line 3

def ip
  @ip
end

#lease_timeObject

Returns the value of attribute lease_time.



3
4
5
# File 'lib/traffic_control/client.rb', line 3

def lease_time
  @lease_time
end

#macObject

Returns the value of attribute mac.



3
4
5
# File 'lib/traffic_control/client.rb', line 3

def mac
  @mac
end