Class: Janeway::AST::Null

Inherits:
Expression show all
Defined in:
lib/janeway/ast/null.rb

Overview

Represents JSON null literal within a filter expression

Instance Attribute Summary

Attributes inherited from Expression

#next, #value

Instance Method Summary collapse

Methods inherited from Expression

#indented, #initialize, #singular_query?, #type

Constructor Details

This class inherits a constructor from Janeway::AST::Expression

Instance Method Details

#literal?Boolean

Return true if this is a literal expression

Returns:



19
20
21
# File 'lib/janeway/ast/null.rb', line 19

def literal?
  true
end

#to_sObject



7
8
9
# File 'lib/janeway/ast/null.rb', line 7

def to_s
  'null'
end

#tree(level = 0) ⇒ Array

Parameters:

  • level (Integer) (defaults to: 0)

Returns:

  • (Array)


13
14
15
# File 'lib/janeway/ast/null.rb', line 13

def tree(level = 0)
  indented(level, 'null')
end