From 828cdd0347a12b56c76ea0e28a267e3b3f4301db Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 23 Aug 2016 21:45:39 +0200 Subject: [PATCH] Extended Fixum class with empty? to have an easier content validation. --- lib/core_ext/fixnum.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/core_ext/fixnum.rb diff --git a/lib/core_ext/fixnum.rb b/lib/core_ext/fixnum.rb new file mode 100644 index 000000000..71e6456c8 --- /dev/null +++ b/lib/core_ext/fixnum.rb @@ -0,0 +1,17 @@ +class Fixnum + +=begin + + result = 5.empty? + +result + + false + +=end + + def empty? + false + end + +end