File: entity_list.rb

package info (click to toggle)
ruby-kubeclient 4.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,128 kB
  • sloc: ruby: 4,229; makefile: 6
file content (23 lines) | stat: -rw-r--r-- 514 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'delegate'
module Kubeclient
  module Common
    # Kubernetes Entity List
    class EntityList < DelegateClass(Array)
      attr_reader :continue, :kind, :resourceVersion

      def initialize(kind, resource_version, list, continue = nil)
        @kind = kind
        # rubocop:disable Style/VariableName
        @resourceVersion = resource_version
        @continue = continue
        super(list)
      end

      def last?
        continue.nil?
      end
    end
  end
end