Class: Gobstones::Lang::Not

Inherits:
OneArgExpression show all
Defined in:
lib/gobstones/lang/expressions/boolean_expressions.rb

Instance Attribute Summary

Attributes inherited from OneArgExpression

#argument

Instance Method Summary collapse

Methods inherited from OneArgExpression

#equality_attributes, #initialize, #with_evaluated_argument_in

Methods inherited from Expression

#is_function_call?

Methods included from EqualityDefinition

#==, #equality_attributes

Constructor Details

This class inherits a constructor from Gobstones::Lang::OneArgExpression

Instance Method Details

#evaluate(context) ⇒ Object



7
8
9
# File 'lib/gobstones/lang/expressions/boolean_expressions.rb', line 7

def evaluate(context)
  with_evaluated_argument_in(context, &:not)
end

#to_sObject



11
12
13
# File 'lib/gobstones/lang/expressions/boolean_expressions.rb', line 11

def to_s
  'Not expression'
end