From 0e98179888946e6df2002f94e29e65e80733f306 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Wed, 6 Sep 2017 12:08:44 +0300 Subject: [PATCH] fold the mini check file --- lib/mom/check.rb | 9 --------- lib/mom/truth_check.rb | 11 ++++++++--- 2 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 lib/mom/check.rb diff --git a/lib/mom/check.rb b/lib/mom/check.rb deleted file mode 100644 index 85248a30..00000000 --- a/lib/mom/check.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Mom - - # A base class for conditions in MOM - # Just a marker, no real functionality for now - - class Check < Instruction - - end -end diff --git a/lib/mom/truth_check.rb b/lib/mom/truth_check.rb index 389993af..b4ce6d78 100644 --- a/lib/mom/truth_check.rb +++ b/lib/mom/truth_check.rb @@ -1,7 +1,12 @@ -require_relative "check" - module Mom + # A base class for conditions in MOM + # Just a marker, no real functionality for now + + class Check < Instruction + + end + # 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 @@ -11,7 +16,7 @@ module Mom attr_reader :condition def initialize(condition) - @condition = condition + @condition = condition end end end