Class: VpsAdminOS::Converter::NetInterface::Routed

Inherits:
Base
  • Object
show all
Defined in:
lib/vpsadminos-converter/net_interface/routed.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#hwaddr, #ip_addresses, #name, #type

Instance Method Summary collapse

Methods inherited from Base

#initialize, type

Constructor Details

This class inherits a constructor from VpsAdminOS::Converter::NetInterface::Base

Instance Attribute Details

#routesObject

Returns the value of attribute routes.



7
8
9
# File 'lib/vpsadminos-converter/net_interface/routed.rb', line 7

def routes
  @routes
end

Instance Method Details

#dumpObject



9
10
11
12
13
14
15
# File 'lib/vpsadminos-converter/net_interface/routed.rb', line 9

def dump
  super.merge(
    'routes' => routes.to_h do |ip_v, addrs|
      ["v#{ip_v}", addrs.map(&:to_string)]
    end
  )
end