Class: Aliyun::OSS::ACL::OptionProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/aliyun/oss/acl.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ OptionProcessor

Returns a new instance of OptionProcessor.



93
94
95
96
97
# File 'lib/aliyun/oss/acl.rb', line 93

def initialize(options)
  options.to_normalized_options!
  @options      = options
  @access_level = extract_access_level
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



86
87
88
# File 'lib/aliyun/oss/acl.rb', line 86

def options
  @options
end

Class Method Details

.process!(options) ⇒ Object



88
89
90
# File 'lib/aliyun/oss/acl.rb', line 88

def process!(options)
  new(options).process!
end

Instance Method Details

#process!Object



99
100
101
102
103
# File 'lib/aliyun/oss/acl.rb', line 99

def process!
  return unless access_level_specified?
  validate!
  options['x-oss-acl'] = access_level
end