Permalink
Browse files

Improve code

  • Loading branch information...
1 parent 993e064 commit cfba81f9a9d1abbb8239731d793aa86250b0ef16 @kachick committed Mar 31, 2013
Showing with 10 additions and 11 deletions.
  1. +3 −11 lib/aprilfool.rb
  2. +7 −0 lib/time/aprilfool.rb
View
14 lib/aprilfool.rb
@@ -1,21 +1,13 @@
# Copyright (C) 2012 Kenichi Kamiya
-# A joke library.
+# apilfool - A joke library.
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
-module AprilFool
- VERSION = '0.0.1'
-end
-
-class Time
- def aprilfool?
- (month == 4) && (day == 1)
- end
-end
+require_relative 'time/aprilfool'
if Time.now.aprilfool?
module Kernel
@@ -27,4 +19,4 @@ def p(*args)
end
else
$stderr.puts 'WARN: Get back to your normal life. o_0'
-end
+end
View
7 lib/time/aprilfool.rb
@@ -0,0 +1,7 @@
+class Time
+
+ def aprilfool?
+ (month == 4) && (day == 1)
+ end
+
+end

0 comments on commit cfba81f

Please sign in to comment.