Sha256: 2b1aa193d4d096e76389cdb1b20849d0dfa9360e60a6bb1f278872519c38e16d
Contents?: true
Size: 1.02 KB
Versions: 38
Compression:
Stored size: 1.02 KB
Contents
require 'fog/core/collection' require 'fog/virtual_box/models/compute/network_adapter' module Fog module Compute class VirtualBox class NetworkAdapters < Fog::Collection model Fog::Compute::VirtualBox::NetworkAdapter attr_accessor :machine def all requires :machine data = [] raw_machine = machine.instance_variable_get(:@raw) connection.system_properties.network_adapter_count.times do |index| data << { :raw => raw_machine.get_network_adapter(index) } end load(data) end def get(network_adapter_slot) requires :machine raw_machine = machine.instance_variable_get(:@raw) network_adapter = raw_machine.get_network_adapter(network_adapter_slot) new(:raw => network_adapter) end def new(attributes = {}) requires :machine super({ :machine => machine }.merge!(attributes)) end end end end end
Version data entries
38 entries across 38 versions & 13 rubygems