rubyx/lib/mom/truth_check.rb
Torsten Ruger dab4e74659 Reworking if statement
Using 2 phase approach
Flattening tbd
2017-09-04 21:00:08 +03:00

18 lines
391 B
Ruby

require_relative "check"
module Mom
# The funny thing about the ruby truth is that is is anything but false or nil
#
# To implement the normal ruby logic, we check for false or nil and jump
# to the false branch. true_block follows implicitly
#
class TruthCheck < Check
attr_reader :condition
def initialize(condition)
@condition = condition
end
end
end