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
#==, #fetch_reference, from_ruby, #hash, #type_name, #undefined?
Constructor Details
#initialize ⇒ UndefinedValue
Create an undefined value marker.
205 206 207 |
# File 'lib/ruby/rego/value.rb', line 205 def initialize super(UNDEFINED) end |
Instance Method Details
#object_key ⇒ UndefinedValue
Use the instance itself as an object key.
226 227 228 |
# File 'lib/ruby/rego/value.rb', line 226 def object_key self end |
#to_ruby ⇒ Object
Return the singleton undefined marker.
219 220 221 |
# File 'lib/ruby/rego/value.rb', line 219 def to_ruby UNDEFINED end |
#truthy? ⇒ Boolean
Undefined is falsy.
212 213 214 |
# File 'lib/ruby/rego/value.rb', line 212 def truthy? false end |