Class: Smartdown::Model::Predicate::Comparison::Greater

Inherits:
Base
  • Object
show all
Defined in:
lib/smartdown/model/predicate/comparison/greater.rb

Instance Attribute Summary

Attributes inherited from Base

#value, #varname

Instance Method Summary collapse

Instance Method Details

#evaluate(state) ⇒ Object



9
10
11
12
# File 'lib/smartdown/model/predicate/comparison/greater.rb', line 9

def evaluate(state)
  variable = state.get(varname)
  variable > value
end

#humanizeObject



14
15
16
# File 'lib/smartdown/model/predicate/comparison/greater.rb', line 14

def humanize
  "#{varname} > #{value}"
end