From d578196f9a5b583c167d60d0f10d7684f41aa318 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 20 Mar 2005 23:12:05 +0000 Subject: Added pagination support through both a controller and helper add-on #817 [Sam Stephenson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/kernel.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 activesupport/lib/active_support/core_ext/kernel.rb (limited to 'activesupport/lib/active_support/core_ext/kernel.rb') diff --git a/activesupport/lib/active_support/core_ext/kernel.rb b/activesupport/lib/active_support/core_ext/kernel.rb new file mode 100644 index 0000000000..fe6f725bc0 --- /dev/null +++ b/activesupport/lib/active_support/core_ext/kernel.rb @@ -0,0 +1,17 @@ +module Kernel + # A Ruby-ized realization of the K combinator, courtesy of Mikael Brockman. + # + # def foo + # returning values = [] do + # values << 'bar' + # values << 'baz' + # end + # end + # + # foo # => ['bar', 'baz'] + # + def returning(value) #:nodoc: + yield + value + end +end -- cgit v1.2.3