Sha256: f30e7eb7bd08119277f9e0bfc0e98844afbf3965fa4d92fdca1aff57953e07b1

Contents?: true

Size: 560 Bytes

Versions: 31

Compression:

Stored size: 560 Bytes

Contents

module Aptible
  module CLI
    module Formatter
      class KeyedList < List
        # KeyedList is a list of objects with one key that is more important
        # than the others. Some renderers may opt to only display this key when
        # rendering the list.
        attr_reader :key

        def initialize(key)
          @key = key
          super()
        end

        def value(_)
          raise "not supported on #{self.class}"
        end

        def list
          raise "not supported on #{self.class}"
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
aptible-cli-0.22.0 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.21.0 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.20.0 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.19.9 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.19.7 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.19.6 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.19.4 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.19.3 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.19.2 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.19.1 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.19.0 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.18.3 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.18.2 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.18.1 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.18.0 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.17.2 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.17.1 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.17.0 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.16.9 lib/aptible/cli/formatter/keyed_list.rb
aptible-cli-0.16.8 lib/aptible/cli/formatter/keyed_list.rb