Skip to content

Commit 842200c

Browse files
Use comment for example return values [ci-skip]
1 parent 125b77f commit 842200c

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

activemodel/lib/active_model/model.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module Model
5454
#
5555
# person = Person.new(id: 1, name: "bob")
5656
# person.slice(:id, :name)
57-
# => { "id" => 1, "name" => "bob" }
57+
# # => { "id" => 1, "name" => "bob" }
5858
#
5959
#--
6060
# Implemented by ActiveModel::Access#slice.
@@ -68,7 +68,7 @@ module Model
6868
#
6969
# person = Person.new(id: 1, name: "bob")
7070
# person.values_at(:id, :name)
71-
# => [1, "bob"]
71+
# # => [1, "bob"]
7272
#
7373
#--
7474
# Implemented by ActiveModel::Access#values_at.

activerecord/lib/active_record/attribute_methods/serialization.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ module ClassMethods
140140
# silently cast unsupported types to +String+:
141141
#
142142
# >> JSON.parse(JSON.dump(Struct.new(:foo)))
143-
# => "#<Class:0x000000013090b4c0>"
143+
# # => "#<Class:0x000000013090b4c0>"
144144
#
145145
# ==== Examples
146146
#

activerecord/lib/active_record/core.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def encode_with(coder)
599599
#
600600
# topic = Topic.new(title: "Budget", author_name: "Jason")
601601
# topic.slice(:title, :author_name)
602-
# => { "title" => "Budget", "author_name" => "Jason" }
602+
# # => { "title" => "Budget", "author_name" => "Jason" }
603603
#
604604
#--
605605
# Implemented by ActiveModel::Access#slice.
@@ -613,7 +613,7 @@ def encode_with(coder)
613613
#
614614
# topic = Topic.new(title: "Budget", author_name: "Jason")
615615
# topic.values_at(:title, :author_name)
616-
# => ["Budget", "Jason"]
616+
# # => ["Budget", "Jason"]
617617
#
618618
#--
619619
# Implemented by ActiveModel::Access#values_at.

activerecord/lib/active_record/relation/finder_methods.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ module FinderMethods
2424
# TravelRoute.primary_key = [:origin, :destination]
2525
#
2626
# TravelRoute.find(["Ottawa", "London"])
27-
# => #<TravelRoute origin: "Ottawa", destination: "London">
27+
# # => #<TravelRoute origin: "Ottawa", destination: "London">
2828
#
2929
# TravelRoute.find([["Paris", "Montreal"]])
30-
# => [#<TravelRoute origin: "Paris", destination: "Montreal">]
30+
# # => [#<TravelRoute origin: "Paris", destination: "Montreal">]
3131
#
3232
# TravelRoute.find(["New York", "Las Vegas"], ["New York", "Portland"])
33-
# => [
34-
# #<TravelRoute origin: "New York", destination: "Las Vegas">,
35-
# #<TravelRoute origin: "New York", destination: "Portland">
36-
# ]
33+
# # => [
34+
# # #<TravelRoute origin: "New York", destination: "Las Vegas">,
35+
# # #<TravelRoute origin: "New York", destination: "Portland">
36+
# # ]
3737
#
3838
# TravelRoute.find([["Berlin", "London"], ["Barcelona", "Lisbon"]])
39-
# => [
40-
# #<TravelRoute origin: "Berlin", destination: "London">,
41-
# #<TravelRoute origin: "Barcelona", destination: "Lisbon">
42-
# ]
39+
# # => [
40+
# # #<TravelRoute origin: "Berlin", destination: "London">,
41+
# # #<TravelRoute origin: "Barcelona", destination: "Lisbon">
42+
# # ]
4343
#
4444
# NOTE: The returned records are in the same order as the ids you provide.
4545
# If you want the results to be sorted by database, you can use ActiveRecord::QueryMethods#where

activerecord/lib/active_record/relation/query_methods.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ def null_relation? # :nodoc:
13051305
#
13061306
# users.readonly(false)
13071307
# users.first.save
1308-
# => true
1308+
# # => true
13091309
def readonly(value = true)
13101310
spawn.readonly!(value)
13111311
end

activesupport/lib/active_support/core_ext/string/filters.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ def truncate(truncate_to, options = {})
8888
# characters.
8989
#
9090
# >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".size
91-
# => 20
91+
# # => 20
9292
# >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".bytesize
93-
# => 80
93+
# # => 80
9494
# >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".truncate_bytes(20)
95-
# => "🔪🔪🔪🔪…"
95+
# # => "🔪🔪🔪🔪…"
9696
#
9797
# The truncated text ends with the <tt>:omission</tt> string, defaulting
9898
# to "…", for a total length not exceeding <tt>truncate_to</tt>.

activesupport/lib/active_support/core_ext/string/multibyte.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ class String
1212
# class. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsulated string.
1313
#
1414
# >> "lj".mb_chars.upcase.to_s
15-
# => "LJ"
15+
# # => "LJ"
1616
#
1717
# NOTE: Ruby 2.4 and later support native Unicode case mappings:
1818
#
1919
# >> "lj".upcase
20-
# => "LJ"
20+
# # => "LJ"
2121
#
2222
# == \Method chaining
2323
#

activesupport/lib/active_support/json/decoding.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ class << self
1818
# See http://www.json.org for more info.
1919
#
2020
# ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}")
21-
# => {"team" => "rails", "players" => "36"}
21+
# # => {"team" => "rails", "players" => "36"}
2222
# ActiveSupport::JSON.decode("2.39")
23-
# => 2.39
23+
# # => 2.39
2424
def decode(json, options = {})
2525
data = ::JSON.parse(json, options)
2626

0 commit comments

Comments
 (0)