class Qiniu::Fop::Persistance::PfopPolicy

Constants

PARAMS

Public Class Methods

new(bucket, key, fops, notify_url) click to toggle source
# File lib/qiniu/pfop.rb, line 14
def initialize(bucket,
               key,
               fops,
               notify_url)
  @bucket     = bucket
  @key        = key
  @notify_url = notify_url

  self.fops!(fops)
end

Public Instance Methods

fops!(fops) click to toggle source
# File lib/qiniu/pfop.rb, line 46
def fops! (fops)
  if fops.is_a?(Hash) then
    fops = fops.values
  end

  if fops.is_a?(Array) then
    new_fops = []
    fops.each do |v|
      if v.is_a?(ApiSpecification) then
        new_fops.push(v.to_s)
      end
    end

    @fops = new_fops.join(";")
  else
    @fops = fops.to_s
  end
end
force!() click to toggle source
# File lib/qiniu/pfop.rb, line 65
def force!
  @force = 1
end
params() click to toggle source
# File lib/qiniu/pfop.rb, line 42
def params
  return PARAMS
end