Class: Cerbos::Hub::Stores::Output::ModifyFiles
- Inherits:
-
Object
- Object
- Cerbos::Hub::Stores::Output::ModifyFiles
- Defined in:
- lib/cerbos/hub/stores/output/modify_files.rb
Overview
The outcome of modifying files in a store.
Instance Attribute Summary collapse
-
#changed ⇒ Boolean
readonly
Whether any changes were made to the store contents.
-
#new_store_version ⇒ Integer
readonly
The new version of the store after the files were replaced.
Instance Attribute Details
#changed ⇒ Boolean (readonly)
Whether any changes were made to the store contents.
This can only be false if allow_unchanged was true.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cerbos/hub/stores/output/modify_files.rb', line 10 ModifyFiles = Cerbos::Output.new_class(:new_store_version, :changed) do # @!attribute [r] new_store_version # The new version of the store after the files were replaced. # # If `allow_unchanged` was `true`, this will be the existing store version if no changes were made. # # @return [Integer] # @!attribute [r] changed # Whether any changes were made to the store contents. # # This can only be `false` if `allow_unchanged` was `true`. # # @return [Boolean] def self.from_protobuf(modify_files) new( new_store_version: modify_files.new_store_version, changed: true ) end end |
#new_store_version ⇒ Integer (readonly)
The new version of the store after the files were replaced.
If allow_unchanged was true, this will be the existing store version if no changes were made.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cerbos/hub/stores/output/modify_files.rb', line 10 ModifyFiles = Cerbos::Output.new_class(:new_store_version, :changed) do # @!attribute [r] new_store_version # The new version of the store after the files were replaced. # # If `allow_unchanged` was `true`, this will be the existing store version if no changes were made. # # @return [Integer] # @!attribute [r] changed # Whether any changes were made to the store contents. # # This can only be `false` if `allow_unchanged` was `true`. # # @return [Boolean] def self.from_protobuf(modify_files) new( new_store_version: modify_files.new_store_version, changed: true ) end end |