aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/class
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add option for class_attribute default (#29270)David Heinemeier Hansson2017-05-291-1/+9
| | | | | | | | | | | | * Allow a default value to be declared for class_attribute * Convert to using class_attribute default rather than explicit setter * Removed instance_accessor option by mistake * False is a valid default value * Documentation
* modernizes hash syntax in activesupportXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in activesupport/testXavier Noria2016-08-061-19/+19
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Remove `.superclass_delegating_accessor`. Refer #14271Akshay Vishnoi2015-05-241-122/+0
|
* Active support instead of ActiveSupport::Deprecation.silence we can use ↵Rajarshi Das2014-04-041-4/+4
| | | | assert_deprecated
* Deprecate Class#superclass_delegating_accessorAkshay Vishnoi2014-03-201-6/+28
|
* Prevent creation of instance methods when `instance_reader = false`, Grammar ↵Akshay Vishnoi2013-12-191-1/+4
| | | | checks, Conditional statements combined
* Unify cattr and mattr accessors declarationsGenadi Samokovarov2013-12-021-70/+0
|
* Unify `cattr_*` interface: allow to pass a block to `cattr_reader`.Alexey Chernenkov2013-11-151-0/+9
| | | | | | | | | Example: class A cattr_reader(:defr) { 'default_reader_value' } end A.defr # => 'default_reader_value'
* more descriptive NameError's messages for class attributesHrvoje Šimić2013-04-171-4/+6
|
* Add option to Class#class_attribute for skipping the query methodAgis-2013-04-061-2/+7
|
* Add instance_accessor option to class_attributeAlexey Vakhov2012-05-221-0/+7
|
* validate attribute names in class and module attribute accessorsDmitry Plashchynski2012-03-301-0/+14
|
* use AS::TestCase as the base classAaron Patterson2012-01-052-2/+2
|
* Add option to omit creating an instance reader method on class_attributeJames Miller2011-06-181-0/+6
|
* Added instance_accessor: false as an option to Class#cattr_accessor and ↵David Heinemeier Hansson2011-06-131-2/+9
| | | | friends [DHH]
* Removed deprecated methods and related tests from ActiveSupportJosh Kalderimis2011-05-251-230/+0
|
* class inheritable attributes is used no more! all internal use of class ↵Josh Kalderimis2010-11-201-0/+5
| | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com>
* Class Attribute setter returns set valuePeter Wagenet2010-08-161-0/+5
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-142-16/+16
| | | | 's/[ \t]*$//' -i {} \;)
* Final iteration of use better testing methodsNeeraj Singh2010-05-193-10/+10
| | | | | | [#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix class_attribute so that it works with singleton classes.Carl Lerche2010-04-011-0/+6
|
* fixing inconsistency with cattr_reader and matter_reader [#4172 state:resolved]Kabari Hendrick2010-03-271-1/+7
| | | Signed-off-by: wycats <wycats@gmail.com>
* Remove test ordering bugEvan Phoenix2010-03-221-8/+14
| | | | | Don't reuse classes with class attributes when testing different use cases of class attributes.
* class_attribute gets instance methods which delegate to but may override ↵Jeremy Kemper2010-03-081-10/+25
| | | | their class values as you'd expect. Disable instance writer methods with :instance_writer => false.
* Clear the attribute after doneYehuda Katz2010-02-161-0/+2
|
* Introduce class_attribute to declare inheritable class attributes. Writing ↵Jeremy Kemper2010-02-011-0/+47
| | | | an attribute on a subclass behaves just like overriding the superclass reader method. Unifies and replaces most usage of cattr_accessor, class_inheritable_attribute, superclass_delegating_attribute, and extlib_inheritable_attribute.
* superclass_delegating_accessor rewritten to serve as the base for many other ↵Yehuda Katz2010-01-291-34/+0
| | | | kinds of accessors (step 1 of unification)
* Allow :instance_reader to be given to superclass_delegating_accessor as well.José Valim2009-11-011-0/+7
|
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-222-0/+2
|
* Explicitly require core extension under testJeremy Kemper2009-03-241-0/+1
|
* Add query methods for superclass_delegating_readerJeremy Kemper2008-03-311-4/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-053-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat. References #1689 [Pratik Naik]Jeremy Kemper2007-12-101-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add new superclass_delegating_accessors. Similar to class inheritable ↵Michael Koziarski2007-10-291-0/+105
| | | | | | attributes but with subtly different semantics. [Koz, tarmo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve various test coverage. Closes #8676 [kamal]Jeremy Kemper2007-06-251-0/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7117 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :instance_writer option to #mattr_writer/accessor, ↵Rick Olson2007-01-282-0/+239
#cattr_writer/accessor, and #class_inheritable_writer to skip the creation of the instance writer. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6050 5ecf4fe2-1ee6-0310-87b1-e25e094e27de