Method: VirtualBox::Net#to_hash

Defined in:
lib/virtual_box/net.rb

#to_hashHash<Symbol, Object>

Hash capturing this specification. Can be passed to Net#new.

Returns:

  • (Hash<Symbol, Object>)

    Ruby-friendly Hash that can be used to re-create this virtual network specification



67
68
69
# File 'lib/virtual_box/net.rb', line 67

def to_hash
  { :ip => ip, :netmask => netmask, :dhcp => dhcp && dhcp.to_hash }
end