Class: Azure::Storage::Common::Service::CorsRule

Inherits:
Object
  • Object
show all
Defined in:
lib/azure/storage/common/service/cors_rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ CorsRule

Returns a new instance of CorsRule.

Yields:

  • (_self)

Yield Parameters:



30
31
32
33
34
35
36
37
38
39
# File 'lib/azure/storage/common/service/cors_rule.rb', line 30

def initialize
  # All CORS rule elements are required if the CorsRule element is specified.
  # The request will fail with error code 400 (Bad Request) if any element is missing.
  @allowed_origins = []
  @allowed_methods = []
  @exposed_headers = []
  @allowed_headers = []
  @max_age_in_seconds = 0
  yield self if block_given?
end

Instance Attribute Details

#allowed_headersObject

Returns the value of attribute allowed_headers.



45
46
47
# File 'lib/azure/storage/common/service/cors_rule.rb', line 45

def allowed_headers
  @allowed_headers
end

#allowed_methodsObject

Returns the value of attribute allowed_methods.



42
43
44
# File 'lib/azure/storage/common/service/cors_rule.rb', line 42

def allowed_methods
  @allowed_methods
end

#allowed_originsObject

Returns the value of attribute allowed_origins.



41
42
43
# File 'lib/azure/storage/common/service/cors_rule.rb', line 41

def allowed_origins
  @allowed_origins
end

#exposed_headersObject

Returns the value of attribute exposed_headers.



44
45
46
# File 'lib/azure/storage/common/service/cors_rule.rb', line 44

def exposed_headers
  @exposed_headers
end

#max_age_in_secondsObject

Returns the value of attribute max_age_in_seconds.



43
44
45
# File 'lib/azure/storage/common/service/cors_rule.rb', line 43

def max_age_in_seconds
  @max_age_in_seconds
end