Class: Synvert::Core::NodeQuery::Compiler::Nil

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/synvert/core/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

Instance Method Summary collapse

Methods included from Comparable

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

Constructor Details

#initialize(value:) ⇒ Nil

Initialize a Nil.

Parameters:

  • value (nil)

    the nil value



10
11
12
# File 'lib/synvert/core/node_query/compiler/nil.rb', line 10

def initialize(value:)
  @value = value
end

Instance Method Details

#to_sObject



19
20
21
# File 'lib/synvert/core/node_query/compiler/nil.rb', line 19

def to_s
  'nil'
end

#valid_operatorsObject

Get valid operators.



15
16
17
# File 'lib/synvert/core/node_query/compiler/nil.rb', line 15

def valid_operators
  SIMPLE_VALID_OPERATORS
end