Class: TrafficControl::Client
- Inherits:
-
Object
- Object
- TrafficControl::Client
- Defined in:
- lib/traffic_control/client.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#lease_time ⇒ Object
Returns the value of attribute lease_time.
-
#mac ⇒ Object
Returns the value of attribute mac.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Client
constructor
A new instance of Client.
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_id ⇒ Object
Returns the value of attribute client_id.
3 4 5 |
# File 'lib/traffic_control/client.rb', line 3 def client_id @client_id end |
#ip ⇒ Object
Returns the value of attribute ip.
3 4 5 |
# File 'lib/traffic_control/client.rb', line 3 def ip @ip end |
#lease_time ⇒ Object
Returns the value of attribute lease_time.
3 4 5 |
# File 'lib/traffic_control/client.rb', line 3 def lease_time @lease_time end |
#mac ⇒ Object
Returns the value of attribute mac.
3 4 5 |
# File 'lib/traffic_control/client.rb', line 3 def mac @mac end |