From 5fa6563f09cd1ee84860364195249a9f7faa26a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Glauco=20Cust=C3=B3dio?= Date: Tue, 11 Jul 2017 14:19:10 -0300 Subject: Add documentation for class_attribute options --- activesupport/lib/active_support/core_ext/class/attribute.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activesupport/lib/active_support/core_ext/class/attribute.rb') diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index a6da65e96d..f47736b3b5 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute.rb @@ -7,6 +7,16 @@ class Class # Declare a class-level attribute whose value is inheritable by subclasses. # Subclasses can change their own value and it will not impact parent class. # + # ==== Options + # + # * :instance_reader - Sets the instance reader method (defaults to true). + # * :instance_writer - Sets the instance writer method (defaults to true). + # * :instance_accessor - Sets both instance methods (defaults to true). + # * :instance_predicate - Sets a predicate method (defaults to true). + # * :default - Sets a default value for the attribute (defaults to nil). + # + # ==== Examples + # # class Base # class_attribute :setting # end -- cgit v1.2.3