Class: Keisan::AST::Null
Instance Method Summary
collapse
#==, #evaluate, #to_s
Methods inherited from Node
#!, #%, #&, #*, #**, #+, #+@, #-, #-@, #/, #<, #<<, #<=, #>, #>=, #>>, #^, #and, #coerce, #contains_a?, #deep_dup, #differentiate, #differentiated, #evaluate, #evaluate_assignments, #evaluated, #false?, #or, #replace, #replaced, #simplified, #simplify, #to_cell, #to_node, #traverse, #unbound_functions, #unbound_variables, #well_defined?, #|, #~
Constructor Details
#initialize ⇒ Null
Returns a new instance of Null.
4
5
|
# File 'lib/keisan/ast/null.rb', line 4
def initialize
end
|
Instance Method Details
#equal(other) ⇒ Object
15
16
17
18
|
# File 'lib/keisan/ast/null.rb', line 15
def equal(other)
other = other.to_node
other.is_a?(AST::Null) ? Boolean.new(value == other.value) : super
end
|
#not_equal(other) ⇒ Object
20
21
22
23
|
# File 'lib/keisan/ast/null.rb', line 20
def not_equal(other)
other = other.to_node
other.is_a?(AST::Null) ? Boolean.new(value != other.value) : super
end
|
11
12
13
|
# File 'lib/keisan/ast/null.rb', line 11
def true?
false
end
|
#value(context = nil) ⇒ Object
7
8
9
|
# File 'lib/keisan/ast/null.rb', line 7
def value(context = nil)
nil
end
|