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
-
#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
#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 |
# File 'lib/cerbos/output/check_resources.rb', line 236 CheckResources::Result::Output = Output.new_class(:source, :value) do # @!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( 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 |
# File 'lib/cerbos/output/check_resources.rb', line 236 CheckResources::Result::Output = Output.new_class(:source, :value) do # @!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( source: output_entry.src, value: output_entry.val&.to_ruby(true) ) end end |