Class: Synvert::Core::NodeQuery::Compiler::Boolean

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

Overview

Boolean represents a ruby boolean 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, #match?, #valid_operator?

Constructor Details

#initialize(value:) ⇒ Boolean

Initialize a Boolean.

Parameters:

  • value (Boolean)

    the boolean value



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

def initialize(value:)
  @value = value
end

Instance Method Details

#to_sObject



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

def to_s
  @value.to_s
end

#valid_operatorsObject

Get valid operators.



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

def valid_operators
  SIMPLE_VALID_OPERATORS
end