Closed logicminds closed 6 years ago
Maybe have the getter and setter of the state field read/write to the file .
getter and setter of what exactly. Can you provide an example? Should I be setting @state in the init method?
Get and setter of the state.
class Foo
state_machine :state do
#...
end
def state
File.read(some_path)
end
def state=(new_state)
File.write(some_path, new_state)
end
end
I want to use this in a CLI workflow based App. I don't have any need for a database so I was hoping I can store the state in a file. Does this gem allow me to store the state in a file?
And how would I do so?