提交 e872a8f2 编写于 作者: B Ben Orenstein

Example descriptions and their examples were flipped. Fix.

上级 e331ec09
...@@ -25,13 +25,13 @@ def squish! ...@@ -25,13 +25,13 @@ def squish!
# "Once upon a time in a world far far away".truncate(27) # "Once upon a time in a world far far away".truncate(27)
# # => "Once upon a time in a wo..." # # => "Once upon a time in a wo..."
# #
# The last characters will be replaced with the <tt>:omission</tt> string (defaults to "...") # Pass a <tt>:separator</tt> to truncate +text+ at a natural break:
# for a total length not exceeding <tt>:length</tt>:
# #
# "Once upon a time in a world far far away".truncate(27, :separator => ' ') # "Once upon a time in a world far far away".truncate(27, :separator => ' ')
# # => "Once upon a time in a..." # # => "Once upon a time in a..."
# #
# Pass a <tt>:separator</tt> to truncate +text+ at a natural break: # The last characters will be replaced with the <tt>:omission</tt> string (defaults to "...")
# for a total length not exceeding <tt>:length</tt>:
# #
# "And they found that many people were sleeping better.".truncate(25, :omission => "... (continued)") # "And they found that many people were sleeping better.".truncate(25, :omission => "... (continued)")
# # => "And they f... (continued)" # # => "And they f... (continued)"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册