Sha256: 636813c6ee04a1a70d351dc4ba3daf4905358e1954553c543c6e8de71bce0b9f
Contents?: true
Size: 492 Bytes
Versions: 7
Compression:
Stored size: 492 Bytes
Contents
module Riserva::Commands class UploadFile < ApplicationCommand def initialize(storage) super() @storage = storage end def call(path) return broadcast(:invalid) unless super success? ? broadcast(:ok, @path) : broadcast(:failed, @path) end private def success? upload && verify end def upload @storage.upload(@path, @path.basename) end def verify @storage.verify(@path.basename, @path) end end end
Version data entries
7 entries across 7 versions & 1 rubygems