Class: Smartdown::Model::Predicate::Comparison::Less

Inherits:
Base
  • Object
show all
Defined in:
lib/smartdown/model/predicate/comparison/less.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/less.rb', line 9

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

#humanizeObject



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

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