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
#==, #canonical, canonicalize, canonicalize_each, canonicalize_float, #fetch_reference, from_ruby, #hash, #object_key, #to_ruby, #truthy?, #type_name, #undefined?
Constructor Details
#initialize(value) ⇒ NumberValue
Create a numeric value.
210 211 212 213 214 |
# File 'lib/ruby/rego/value.rb', line 210 def initialize(value) raise ArgumentError, "Expected Numeric, got #{value.class}" unless value.is_a?(Numeric) super end |