Class: Ruby::Rego::NumberValue
Overview
Represents a numeric value.
Constant Summary collapse
- TYPE_NAME =
"number"
Instance Attribute Summary
Attributes inherited from Value
Instance Method Summary collapse
-
#initialize(value) ⇒ NumberValue
constructor
Create a numeric value.
Methods inherited from Value
#==, #fetch_reference, from_ruby, #hash, #object_key, #to_ruby, #truthy?, #type_name, #undefined?
Constructor Details
#initialize(value) ⇒ NumberValue
Create a numeric value.
153 154 155 156 157 |
# File 'lib/ruby/rego/value.rb', line 153 def initialize(value) raise ArgumentError, "Expected Numeric, got #{value.class}" unless value.is_a?(Numeric) super end |