https://github.com/trailblazer/trailblazer-declarative
Generic DSL providing schemas and inheritance.
https://github.com/trailblazer/trailblazer-declarative
Last synced: 5 months ago
JSON representation
Generic DSL providing schemas and inheritance.
- Host: GitHub
- URL: https://github.com/trailblazer/trailblazer-declarative
- Owner: trailblazer
- Created: 2022-02-07T15:11:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-20T08:15:43.000Z (over 2 years ago)
- Last Synced: 2025-05-07T20:42:25.933Z (5 months ago)
- Language: Ruby
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Trailblazer::Declarative
## State
`State` is a minimalistic state handling object, similar to a hash with
additional "inheritance" logic via `State#copy`. Every field in `state`
can have a specific copying strategy, ranging from simply referencing the
original object to subclassing.```ruby
state = Declarative.State(key: ["value", ...])
state.add!
state.update!
state.get
state.copy # inheritance
```