Class: Cerbos::Output::PlanResources::Expression::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/cerbos/output/plan_resources.rb

Overview

An abstract syntax tree node representing a constant value.

Instance Attribute Summary collapse

Instance Attribute Details

#valueString, ... (readonly)

The constant value.

Returns:

  • (String, Numeric, Boolean, Array, Hash, nil)


108
109
110
111
112
113
114
115
116
117
# File 'lib/cerbos/output/plan_resources.rb', line 108

PlanResources::Expression::Value = Output.new_class(:value) do
  # @!attribute [r] value
  #   The constant value.
  #
  #   @return [String, Numeric, Boolean, Array, Hash, nil]

  def self.from_protobuf(value)
    new(value: value.to_ruby(true))
  end
end