diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-04-24 02:17:06 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-04-24 02:17:06 +0530 |
commit | dcee094b22891a95b69e0c14a963b2f857bfecd0 (patch) | |
tree | 111306f6cb930242e08d62074d87fc526b2d56a2 | |
parent | 3e1f4dbb4db852a3278a883b3f599664e5705de3 (diff) | |
download | rails-dcee094b22891a95b69e0c14a963b2f857bfecd0.tar.gz rails-dcee094b22891a95b69e0c14a963b2f857bfecd0.tar.bz2 rails-dcee094b22891a95b69e0c14a963b2f857bfecd0.zip |
indentation fixes
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index f89c83e4cd..7bda1760a9 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -449,9 +449,9 @@ The predicate +in?+ tests if an object is included in another object. An +Argume Examples of +in?+: <ruby> - 1.in?([1,2]) # => true - "lo".in?("hello") # => true - 25.in?(30..50) # => false +1.in?([1,2]) # => true +"lo".in?("hello") # => true +25.in?(30..50) # => false </ruby> NOTE: Defined in +active_support/core_ext/object/inclusion.rb+. @@ -541,9 +541,9 @@ The default value can be also specified with a block, which is called in the con <ruby> class User attr_accessor :name, :surname - attr_accessor_with_default(:full_name) { - [name, surname].compact.join(" ") - } + attr_accessor_with_default(:full_name) do + [name, surname].compact.join(" ") + end end u = User.new @@ -1223,7 +1223,7 @@ NOTE: Defined in +active_support/core_ext/string/output_safety.rb+. h4. +squish+ -The method +String#squish+ strips leading and trailing whitespace, and substitutes runs of whitespace with a single space each: +The method +squish+ strips leading and trailing whitespace, and substitutes runs of whitespace with a single space each: <ruby> " \n foo\n\r \t bar \n".squish # => "foo bar" |