Class: Cerbos::Hub::Stores::Output::ListFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/cerbos/hub/stores/output/list_files.rb

Overview

The outcome of listing files in a store.

See Also:

Instance Attribute Summary collapse

Instance Attribute Details

#filesArray<String> (readonly)

Paths of the files that were found in the store.

Returns:

  • (Array<String>)


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/cerbos/hub/stores/output/list_files.rb', line 10

ListFiles = Cerbos::Output.new_class(:store_version, :files) do
  # @!attribute [r] store_version
  #   The current version of the store.
  #
  #   @return [Integer]

  # @!attribute [r] files
  #   Paths of the files that were found in the store.
  #
  #   @return [Array<String>]

  def self.from_protobuf(list_files)
    new(
      store_version: list_files.store_version,
      files: list_files.files
    )
  end
end

#store_versionInteger (readonly)

The current version of the store.

Returns:

  • (Integer)


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/cerbos/hub/stores/output/list_files.rb', line 10

ListFiles = Cerbos::Output.new_class(:store_version, :files) do
  # @!attribute [r] store_version
  #   The current version of the store.
  #
  #   @return [Integer]

  # @!attribute [r] files
  #   Paths of the files that were found in the store.
  #
  #   @return [Array<String>]

  def self.from_protobuf(list_files)
    new(
      store_version: list_files.store_version,
      files: list_files.files
    )
  end
end