forked from hashie/hashie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
heavily rework Dash for bugfixes and performance
- optimize `properties` and `defaults` so they don't do a full ancestry lookup each time a property is accessed - API change: `properties` is now a Set of symbols (was Array of strings) - API change: `defaults` is a Hash with symbol keys and doesn't include properties without defaults - optimize generated accessors to skip lookup if a property exists - fixed accessing the dash with square brackets - change keys to be stored internally as strings instead of symbols - change initialization so it doesn't initialize properties without defaults to nil - allow creating a dash with a block that defines default values as fallback (regular Hash behavior) - allow redefining a property in descendants in order to set a new default value or clear the existing one - rewritten test suite to be more concise and better focused on what's important
- Loading branch information
Showing
2 changed files
with
151 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters