mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
indentation fixes
This commit is contained in:
parent
3e1f4dbb4d
commit
dcee094b22
1 changed files with 7 additions and 7 deletions
|
@ -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) {
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue