Sha256: a44b711807e07afff8d7b5bd3968524ee3c4ad8ff8d156885e9f70b902e1b0a5

Contents?: true

Size: 671 Bytes

Versions: 126

Compression:

Stored size: 671 Bytes

Contents

class TestLab
  class Container

    module Interface

      # Container primary interface
      #
      # Returns the primary interface for the container.  If the container has
      # multiple interfaces, this is based on which ever interface is marked
      # with the primary flag.  If the container only has one interface, then
      # it is returned.
      #
      # @return [TestLab::Interface] The primary interface for the container.
      def primary_interface
        if self.interfaces.any?{ |i| i.primary == true }
          self.interfaces.find{ |i| i.primary == true }
        else
          self.interfaces.first
        end
      end

    end

  end
end

Version data entries

126 entries across 126 versions & 1 rubygems

Version Path
testlab-1.15.1 lib/testlab/container/interface.rb
testlab-1.15.0 lib/testlab/container/interface.rb
testlab-1.14.0 lib/testlab/container/interface.rb
testlab-1.13.0 lib/testlab/container/interface.rb
testlab-1.12.0 lib/testlab/container/interface.rb
testlab-1.11.7 lib/testlab/container/interface.rb
testlab-1.11.6 lib/testlab/container/interface.rb
testlab-1.11.5 lib/testlab/container/interface.rb
testlab-1.11.4 lib/testlab/container/interface.rb
testlab-1.11.3 lib/testlab/container/interface.rb
testlab-1.11.2 lib/testlab/container/interface.rb
testlab-1.11.1 lib/testlab/container/interface.rb
testlab-1.11.0 lib/testlab/container/interface.rb
testlab-1.10.0 lib/testlab/container/interface.rb
testlab-1.9.2 lib/testlab/container/interface.rb
testlab-1.9.1 lib/testlab/container/interface.rb
testlab-1.9.0 lib/testlab/container/interface.rb
testlab-1.8.5 lib/testlab/container/interface.rb
testlab-1.8.4 lib/testlab/container/interface.rb
testlab-1.8.3 lib/testlab/container/interface.rb