lib/rufus/verbs/conditional.rb in rufus-verbs-0.2 vs lib/rufus/verbs/conditional.rb in rufus-verbs-0.3
- old
+ new
@@ -30,10 +30,14 @@
# Made in Japan
#
# 2008/01/16
#
+require 'rubygems'
+require 'rufus/lru'
+
+
module Rufus::Verbs
#
# An EndPoint with a cache for conditional GETs.
#
@@ -58,16 +62,9 @@
def initialize (opts)
super
cs = opts[:cache_size] || 147
-
- require 'rubygems'
- begin
- require 'rufus/lru'
- rescue LoadError
- raise "gem 'rufus-lru' is missing, please install it."
- end
@cache = LruHash.new cs
end
#