aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2009-11-09 23:32:31 +0100
committerXavier Noria <fxn@hashref.com>2009-11-09 23:32:31 +0100
commit169aaa6218dc7ee349f6ab706d16f179dbfbc0dd (patch)
tree4a4b8a18fcc33c6212743e7359657763d24d8cf2 /railties
parent2ed5251d11c5b21c2e852c4fb75cfa8587f203e6 (diff)
downloadrails-169aaa6218dc7ee349f6ab706d16f179dbfbc0dd.tar.gz
rails-169aaa6218dc7ee349f6ab706d16f179dbfbc0dd.tar.bz2
rails-169aaa6218dc7ee349f6ab706d16f179dbfbc0dd.zip
AS guide: removes docs for Object#tap, no longer in AS
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/active_support_core_extensions.textile20
1 files changed, 0 insertions, 20 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index d96c79819b..35aa862835 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -94,26 +94,6 @@ def html_options_for_form(url_for_options, options, *parameters_for_url)
end
</ruby>
-See also "+Object#tap+":#tap.
-
-h4. +tap+
-
-+Object#tap+ exists in Ruby 1.8.7 and 1.9, and it is defined by Active Support for previous versions. This method yields its receiver to a block and returns it.
-
-For example, the following class method from +ActionDispatch::TestResponse+ creates, initializes, and returns a new test response using +tap+:
-
-<ruby>
-def self.from_response(response)
- new.tap do |resp|
- resp.status = response.status
- resp.headers = response.headers
- resp.body = response.body
- end
-end
-</ruby>
-
-See also "+Object#returning+":#returning.
-
h4. +try+
Sometimes you want to call a method provided the receiver object is not +nil+, which is something you usually check first.