Class: Linux::Ip::Addr::Interface

Inherits:
Object
  • Object
show all
Defined in:
lib/linux/ip/addr.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Interface



10
11
12
13
# File 'lib/linux/ip/addr.rb', line 10

def initialize(name)
  @name = name
  @ips = []
end

Instance Attribute Details

#ipsObject (readonly)

Returns the value of attribute ips.



9
10
11
# File 'lib/linux/ip/addr.rb', line 9

def ips
  @ips
end

#mac_addressObject

Returns the value of attribute mac_address.



8
9
10
# File 'lib/linux/ip/addr.rb', line 8

def mac_address
  @mac_address
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/linux/ip/addr.rb', line 9

def name
  @name
end

Instance Method Details

#add_ip(ip) ⇒ Object



14
15
16
# File 'lib/linux/ip/addr.rb', line 14

def add_ip(ip)
  @ips << ip
end