lib/sugar-high/delegate.rb in sugar-high-0.6.3 vs lib/sugar-high/delegate.rb in sugar-high-0.7.0
- old
+ new
@@ -1,7 +1,7 @@
class Module
- unless self.respond_to? :delegate
+ unless respond_to? :delegate
def delegate(*methods)
options = methods.pop
unless options.is_a?(Hash) && to = options[:to]
raise ArgumentError, "Delegation needs a target. Supply an options hash with a :to key as the last argument (e.g. delegate :hello, :to => :greeter)."
end
@@ -35,6 +35,6 @@
end
}
end
end
end
-end
\ No newline at end of file
+end