Class: Host
- Inherits:
-
NetworkElement
- Object
- NetworkElement
- Host
- Defined in:
- lib/network_entities/physical/host.rb
Instance Attribute Summary collapse
-
#gateway_id ⇒ Object
Returns the value of attribute gateway_id.
-
#gateway_port ⇒ Object
Returns the value of attribute gateway_port.
-
#ips ⇒ Object
Returns the value of attribute ips.
-
#mac ⇒ Object
Returns the value of attribute mac.
-
#queue_capacity ⇒ Object
Returns the value of attribute queue_capacity.
Attributes inherited from NetworkElement
#id, #in_elements, #my_number, #out_elements
Instance Method Summary collapse
-
#initialize(id, ips = ["127.0.0.1"], mac = "9A:4A:43:D4:36:45", queue_capacity = -1)) ⇒ Host
constructor
A new instance of Host.
Methods inherited from NetworkElement
Methods included from SerializeBehavior
#transform_to_output_representation, #validate_concrete_builder
Constructor Details
#initialize(id, ips = ["127.0.0.1"], mac = "9A:4A:43:D4:36:45", queue_capacity = -1)) ⇒ Host
Returns a new instance of Host.
6 7 8 9 10 11 |
# File 'lib/network_entities/physical/host.rb', line 6 def initialize(id, ips=["127.0.0.1"], mac="9A:4A:43:D4:36:45", queue_capacity=-1) @ips = ips @mac = mac @queue_capacity = queue_capacity super id end |
Instance Attribute Details
#gateway_id ⇒ Object
Returns the value of attribute gateway_id.
4 5 6 |
# File 'lib/network_entities/physical/host.rb', line 4 def gateway_id @gateway_id end |
#gateway_port ⇒ Object
Returns the value of attribute gateway_port.
4 5 6 |
# File 'lib/network_entities/physical/host.rb', line 4 def gateway_port @gateway_port end |
#ips ⇒ Object
Returns the value of attribute ips.
4 5 6 |
# File 'lib/network_entities/physical/host.rb', line 4 def ips @ips end |
#mac ⇒ Object
Returns the value of attribute mac.
4 5 6 |
# File 'lib/network_entities/physical/host.rb', line 4 def mac @mac end |
#queue_capacity ⇒ Object
Returns the value of attribute queue_capacity.
4 5 6 |
# File 'lib/network_entities/physical/host.rb', line 4 def queue_capacity @queue_capacity end |