public
Description: StrokeDB is an embeddable distributed document database written in Ruby
Homepage: http://strokedb.com/
Clone URL: git://github.com/yrashk/strokedb.git
Search Repo:
ImmutableDocument#make_mutable! has been added
yrashk (author)
Sun May 04 00:44:26 -0700 2008
commit  e88d17472c8a85b3a72ebc76a20d47923126f834
tree    579b3488f244ee853e43361306ba2ebad293273a
parent  9f65b9c0f61fd4c03211f8b77df7d24949cc0ab9
...
745
746
747
 
 
 
 
748
749
750
...
745
746
747
748
749
750
751
752
753
754
0
@@ -745,5 +745,9 @@ module StrokeDB
0
     def save!
0
       self
0
     end
0
+
0
+ def make_mutable!
0
+ unextend(ImmutableDocument)
0
+ end
0
   end
0
 end
0
\ No newline at end of file
...
821
822
823
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
824
825
826
...
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
0
@@ -821,6 +821,23 @@ describe "Document with version" do
0
 
0
 end
0
 
0
+describe "Immutable Document" do
0
+
0
+ before(:each) do
0
+ setup_default_store
0
+ @document = Document.new(:some_data => 1).make_immutable!
0
+ @document.should_not be_mutable
0
+ end
0
+
0
+ it "should be able to be mutable again" do
0
+ @document.make_mutable!
0
+ @document.should be_mutable
0
+ end
0
+
0
+
0
+
0
+end
0
+
0
 describe "Valid Document's JSON" do
0
 
0
   before(:each) do

Comments

    No one has commented yet.