Class: Smartdown::Model::Predicate::NotOperation

Inherits:
Struct
  • Object
show all
Defined in:
lib/smartdown/model/predicate/not_operation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#predicateObject

Returns the value of attribute predicate

Returns:

  • (Object)

    the current value of predicate



4
5
6
# File 'lib/smartdown/model/predicate/not_operation.rb', line 4

def predicate
  @predicate
end

Instance Method Details

#evaluate(state) ⇒ Object



5
6
7
# File 'lib/smartdown/model/predicate/not_operation.rb', line 5

def evaluate(state)
  !predicate.evaluate(state)
end

#humanizeObject



9
10
11
# File 'lib/smartdown/model/predicate/not_operation.rb', line 9

def humanize
  "NOT #{predicate.humanize}"
end