Method: Runo::File#commit
- Defined in:
- lib/scalar/file.rb
#commit(type = :temp) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/scalar/file.rb', line 65 def commit(type = :temp) if type == :temp && @action == :delete @val = {} @body = nil elsif type == :persistent && ps = my[:persistent_sd] case @action when :create, :update, nil ps.storage.store( my[:persistent_name], @body, val['basename'][/\.([\w\.]+)$/, 1] || 'bin' ) if @body && valid? when :delete ps.storage.delete my[:persistent_name] end end super end |