--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Stores an individual Ruby object or a hierarchy of Ruby objects in the data store file under the root name. Assigning to a name already in the data store clobbers the old data.
- !ruby/struct:SM::Flow::H
level: 2
text: "Example:"
- !ruby/struct:SM::Flow::VERB
body: " require "pstore"\n\n store = PStore.new("data_file.pstore")\n store.transaction do # begin transaction\n # load some data into the store...\n store[:single_object] = "My data..."\n store[:obj_heirarchy] = { "Kev Jackson" => ["rational.rb", "pstore.rb"],\n "James Gray" => ["erb.rb", "pstore.rb"] }\n end # commit changes to data store file\n"
- !ruby/struct:SM::Flow::P
body: "WARNING: This method is only valid in a PStore#transaction and it cannot be read-only. It will raise PStore::Error if called at any other time."
full_name: PStore#[]=
is_singleton: false
name: "[]="
params: (name, value)
visibility: public