Class: Qiniu::Fop::Persistance::PfopPolicy
- Inherits:
-
Object
- Object
- Qiniu::Fop::Persistance::PfopPolicy
- Includes:
- ADT::Policy
- Defined in:
- lib/qiniu/pfop.rb
Constant Summary collapse
- PARAMS =
{ # 字符串类型参数 :bucket => "bucket", :key => "key", :fops => "fops", :notify_url => "notifyURL", :pipeline => "pipeline", # 数值类型参数 :force => "force" }
Instance Method Summary collapse
-
#fops!(fops) ⇒ Object
params.
-
#force! ⇒ Object
fops!.
- #params ⇒ Object
Methods included from ADT::Policy
Instance Method Details
#fops!(fops) ⇒ Object
params
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/qiniu/pfop.rb', line 47 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! ⇒ Object
fops!
66 67 68 |
# File 'lib/qiniu/pfop.rb', line 66 def force! @force = 1 end |
#params ⇒ Object
43 44 45 |
# File 'lib/qiniu/pfop.rb', line 43 def params return PARAMS end |