Class: Ruby::Rego::NullValue

Inherits:
Value
  • Object
show all
Defined in:
lib/ruby/rego/value.rb

Overview

Represents a null value.

Constant Summary collapse

TYPE_NAME =
"null"

Instance Attribute Summary

Attributes inherited from Value

#value

Instance Method Summary collapse

Methods inherited from Value

#==, #fetch_reference, from_ruby, #hash, #object_key, #to_ruby, #type_name, #undefined?

Constructor Details

#initializeNullValue

Create a null value.



187
188
189
# File 'lib/ruby/rego/value.rb', line 187

def initialize
  super(nil)
end

Instance Method Details

#truthy?Boolean

Null is falsy.

Returns:

  • (Boolean)


194
195
196
# File 'lib/ruby/rego/value.rb', line 194

def truthy?
  false
end