Pulling my hair out trying to figure out where class_inheritable_reader is documented in Rails.
A Google search revealed its existence, and looking in the gem itself ya find the method:
def class_inheritable_reader(*syms)
syms.each do |sym|
next if sym.is_a?(Hash)
class_eval <<-EOS
def self.#{sym} # def self.before_add_for_comments
read_inheritable_attribute(:#{sym}) # read_inheritable_attribute(:before_add_for_comments)
end # end
#
def #{sym} # def before_add_for_comments
self.class.#{sym} # self.class.before_add_for_comments
end # end
EOS
end
end
....
But looking at the rdocs for both ActiveSupport AND from ‘rake doc:rails’ you’ll find no documentation…how come?
If you open up the folder where gems are installed on your machine, you can navigate to:
to see where the class is actually implemented. In addition, you can see the latest version of the file in the Rails repository on GitHub.
There is class level documentation available in that file (below), but no method level documentation, which is why you probably couldn’t find anything.