-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add decorative
section
method. (#74)
Sometimes people try to sub-divide a file with comments to connote sections, but my eye always end up skipping those. And you can't nest them with more indentation. Instead we can add a decorative method to help us — and we can use blocks to help indent certain sections.
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
Oaken.prepare do | ||
section :registrations | ||
register Menu::Item | ||
|
||
section :roots | ||
user_counter = 0 | ||
users.defaults name: -> { "Customer #{user_counter += 1}" } | ||
|
||
seed :accounts, :data | ||
section :stems | ||
section :leafs | ||
|
||
section do | ||
seed :accounts, :data | ||
end | ||
end |
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