Class: Ruby::Rego::UndefinedValue
Overview
Represents an undefined value.
Constant Summary collapse
- TYPE_NAME =
"undefined"- UNDEFINED =
Object.new.freeze
Instance Attribute Summary
Attributes inherited from Value
Instance Method Summary collapse
-
#initialize ⇒ UndefinedValue
constructor
Create an undefined value marker.
-
#object_key ⇒ UndefinedValue
Use the instance itself as an object key.
-
#to_ruby ⇒ Object
Return the singleton undefined marker.
-
#truthy? ⇒ Boolean
Undefined is falsy.
Methods inherited from Value
#==, #canonical, canonicalize, canonicalize_each, canonicalize_float, #fetch_reference, from_ruby, #hash, #type_name, #undefined?
Constructor Details
#initialize ⇒ UndefinedValue
Create an undefined value marker.
262 263 264 |
# File 'lib/ruby/rego/value.rb', line 262 def initialize super(UNDEFINED) end |
Instance Method Details
#object_key ⇒ UndefinedValue
Use the instance itself as an object key.
283 284 285 |
# File 'lib/ruby/rego/value.rb', line 283 def object_key self end |
#to_ruby ⇒ Object
Return the singleton undefined marker.
276 277 278 |
# File 'lib/ruby/rego/value.rb', line 276 def to_ruby UNDEFINED end |
#truthy? ⇒ Boolean
Undefined is falsy.
269 270 271 |
# File 'lib/ruby/rego/value.rb', line 269 def truthy? false end |