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

#==, #canonical, canonicalize, canonicalize_each, canonicalize_float, #fetch_reference, from_ruby, #hash, #object_key, #to_ruby, #type_name, #undefined?

Constructor Details

#initializeNullValue

Create a null value.



244
245
246
# File 'lib/ruby/rego/value.rb', line 244

def initialize
  super(nil)
end

Instance Method Details

#truthy?Boolean

Null is falsy.

Returns:

  • (Boolean)


251
252
253
# File 'lib/ruby/rego/value.rb', line 251

def truthy?
  false
end