Sha256: b2df493c61258018d8f820a2d26d7c5d86e7902f06a67e94bcdedda8e82811b3
Contents?: true
Size: 969 Bytes
Versions: 7
Compression:
Stored size: 969 Bytes
Contents
require 'fog/core/collection' require 'fog/compute/models/virtual_box/nat_redirect' module Fog module Compute class VirtualBox class NATRedirects < Fog::Collection model Fog::Compute::VirtualBox::NATRedirect attr_accessor :machine, :nat_engine def all requires :machine, :nat_engine data = nat_engine.instance_variable_get(:@raw).redirects.map do |nat_redirect| { :machine => machine, :raw => nat_redirect } end load(data) end def get(nat_redirect_name) requires :machine, :nat_engine all.detect do |nat_redirect| nat_redirect.name == nat_redirect_name end end def new(attributes = {}) requires :machine, :nat_engine super({:machine => machine, :nat_engine => nat_engine}.merge!(attributes)) end end end end end
Version data entries
7 entries across 7 versions & 3 rubygems