Class: Linux::Ip::Route::Interface
- Inherits:
-
Object
- Object
- Linux::Ip::Route::Interface
- Defined in:
- lib/linux/ip/route.rb
Instance Attribute Summary collapse
-
#ips ⇒ Object
readonly
Returns the value of attribute ips.
-
#mac_address ⇒ Object
Returns the value of attribute mac_address.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #add_ip(ip) ⇒ Object
-
#initialize(name) ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize(name) ⇒ Interface
Returns a new instance of Interface.
11 12 13 14 |
# File 'lib/linux/ip/route.rb', line 11 def initialize(name) @name = name @ips = [] end |
Instance Attribute Details
#ips ⇒ Object (readonly)
Returns the value of attribute ips.
10 11 12 |
# File 'lib/linux/ip/route.rb', line 10 def ips @ips end |
#mac_address ⇒ Object
Returns the value of attribute mac_address.
9 10 11 |
# File 'lib/linux/ip/route.rb', line 9 def mac_address @mac_address end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/linux/ip/route.rb', line 10 def name @name end |
Instance Method Details
#add_ip(ip) ⇒ Object
15 16 17 |
# File 'lib/linux/ip/route.rb', line 15 def add_ip(ip) @ips << ip end |