about summary refs log tree commit homepage
path: root/lib/mogilefs/mogilefs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mogilefs/mogilefs.rb')
-rw-r--r--lib/mogilefs/mogilefs.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/mogilefs/mogilefs.rb b/lib/mogilefs/mogilefs.rb
index 75a3936..9f4f988 100644
--- a/lib/mogilefs/mogilefs.rb
+++ b/lib/mogilefs/mogilefs.rb
@@ -256,6 +256,14 @@ class MogileFS::MogileFS < MogileFS::Client
     true
   end
 
+  # Updates +key+ to +newclass+
+  def updateclass(key, newclass)
+    raise MogileFS::ReadOnlyError if readonly?
+
+    @backend.updateclass(:domain => @domain, :key => key, :class => newclass)
+    true
+  end
+
   # Sleeps +duration+, only used for testing
   def sleep(duration) # :nodoc:
     @backend.sleep :duration => duration