Class: NodeQuery::Compiler::Nil

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/node_query/compiler/nil.rb

Overview

Nil represents a ruby nil value.

Constant Summary

Constants included from Comparable

Comparable::ARRAY_VALID_OPERATORS, Comparable::NUMBER_VALID_OPERATORS, Comparable::REGEXP_VALID_OPERATORS, Comparable::SIMPLE_VALID_OPERATORS, Comparable::STRING_VALID_OPERATORS

Instance Method Summary collapse

Methods included from Comparable

#actual_value, #expected_value, #is_equal?, #match?, #valid_operator?

Constructor Details

#initialize(value:, adapter:) ⇒ Nil

Initialize a Nil.

Parameters:



11
12
13
14
# File 'lib/node_query/compiler/nil.rb', line 11

def initialize(value:, adapter:)
  @value = value
  @adapter = adapter
end

Instance Method Details

#to_sObject



22
23
24
# File 'lib/node_query/compiler/nil.rb', line 22

def to_s
  'nil'
end

#valid_operatorsArray

Get valid operators.

Returns:

  • (Array)

    valid operators



18
19
20
# File 'lib/node_query/compiler/nil.rb', line 18

def valid_operators
  SIMPLE_VALID_OPERATORS
end