Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 410 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 410 Bytes

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.

state = Declarative.State(key: ["value", ...])
state.add!
state.update!
state.get
state.copy # inheritance