1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

doc, hide non-public methods form the api docs. [ci skip]

This is a follow up to #25681, specifically this comment:
https://github.com/rails/rails/pull/25681#issuecomment-238294002

The way the thread local variable is stored is an implementation detail
and subject to change. It makes no sense to only generate a reader or
writer as you'd have to know where to read from or where it writes to.
This commit is contained in:
Yves Senn 2016-10-20 21:20:03 +02:00
parent bdc69c38c5
commit 632f4a08a5

View file

@ -33,7 +33,7 @@ class Module
# end
#
# Current.new.user # => NoMethodError
def thread_mattr_reader(*syms)
def thread_mattr_reader(*syms) # :nodoc:
options = syms.extract_options!
syms.each do |sym|
@ -73,7 +73,7 @@ class Module
# end
#
# Current.new.user = "DHH" # => NoMethodError
def thread_mattr_writer(*syms)
def thread_mattr_writer(*syms) # :nodoc:
options = syms.extract_options!
syms.each do |sym|
raise NameError.new("invalid attribute name: #{sym}") unless sym =~ /^[_A-Za-z]\w*$/