Class: Cerbos::Hub::Stores::Output::GetFiles
- Inherits:
-
Object
- Object
- Cerbos::Hub::Stores::Output::GetFiles
- Defined in:
- lib/cerbos/hub/stores/output/get_files.rb
Overview
The outcome of getting files from a store.
Instance Attribute Summary collapse
-
#files ⇒ Array<File>
readonly
Paths of the files that were found in the store.
-
#store_version ⇒ Integer
readonly
The current version of the store.
Instance Attribute Details
#files ⇒ Array<File> (readonly)
Paths of the files that were found in the store.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cerbos/hub/stores/output/get_files.rb', line 10 GetFiles = 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<File>] def self.from_protobuf(get_files) new( store_version: get_files.store_version, files: get_files.files.map { |file| File.from_protobuf(file) } ) end end |
#store_version ⇒ Integer (readonly)
The current version of the store.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cerbos/hub/stores/output/get_files.rb', line 10 GetFiles = 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<File>] def self.from_protobuf(get_files) new( store_version: get_files.store_version, files: get_files.files.map { |file| File.from_protobuf(file) } ) end end |