Class: Cerbos::Output::CheckResources::Result::Output
- Inherits:
-
Object
- Object
- Cerbos::Output::CheckResources::Result::Output
- Defined in:
- lib/cerbos/output/check_resources.rb
Overview
User-defined output from a policy rule evaluation.
Instance Attribute Summary collapse
-
#action ⇒ String
readonly
The action that was being evaluated when the output was produced.
-
#source ⇒ String
readonly
The identifier of the policy rule that produced the output.
-
#value ⇒ String, ...
readonly
The result of evaluating the output expression.
Instance Attribute Details
#action ⇒ String (readonly)
The action that was being evaluated when the output was produced.
Requires the Cerbos policy decision point server to be at least v0.51.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/cerbos/output/check_resources.rb', line 236 CheckResources::Result::Output = Output.new_class(:action, :source, :value) do # @!attribute [r] action # The action that was being evaluated when the output was produced. # # Requires the Cerbos policy decision point server to be at least v0.51. # # @return [String] # @!attribute [r] source # The identifier of the policy rule that produced the output. # # @return [String] # @!attribute [r] value # The result of evaluating the output expression. # # @return [String, Numeric, Boolean, Array, Hash, nil] def self.from_protobuf(output_entry) new( action: output_entry.action, source: output_entry.src, value: output_entry.val&.to_ruby(true) ) end end |
#source ⇒ String (readonly)
The identifier of the policy rule that produced the output.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/cerbos/output/check_resources.rb', line 236 CheckResources::Result::Output = Output.new_class(:action, :source, :value) do # @!attribute [r] action # The action that was being evaluated when the output was produced. # # Requires the Cerbos policy decision point server to be at least v0.51. # # @return [String] # @!attribute [r] source # The identifier of the policy rule that produced the output. # # @return [String] # @!attribute [r] value # The result of evaluating the output expression. # # @return [String, Numeric, Boolean, Array, Hash, nil] def self.from_protobuf(output_entry) new( action: output_entry.action, source: output_entry.src, value: output_entry.val&.to_ruby(true) ) end end |
#value ⇒ String, ... (readonly)
The result of evaluating the output expression.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/cerbos/output/check_resources.rb', line 236 CheckResources::Result::Output = Output.new_class(:action, :source, :value) do # @!attribute [r] action # The action that was being evaluated when the output was produced. # # Requires the Cerbos policy decision point server to be at least v0.51. # # @return [String] # @!attribute [r] source # The identifier of the policy rule that produced the output. # # @return [String] # @!attribute [r] value # The result of evaluating the output expression. # # @return [String, Numeric, Boolean, Array, Hash, nil] def self.from_protobuf(output_entry) new( action: output_entry.action, source: output_entry.src, value: output_entry.val&.to_ruby(true) ) end end |