Class: Azure::Storage::Common::Service::CorsRule
- Inherits:
-
Object
- Object
- Azure::Storage::Common::Service::CorsRule
- Defined in:
- lib/azure/storage/common/service/cors_rule.rb
Instance Attribute Summary collapse
-
#allowed_headers ⇒ Object
Returns the value of attribute allowed_headers.
-
#allowed_methods ⇒ Object
Returns the value of attribute allowed_methods.
-
#allowed_origins ⇒ Object
Returns the value of attribute allowed_origins.
-
#exposed_headers ⇒ Object
Returns the value of attribute exposed_headers.
-
#max_age_in_seconds ⇒ Object
Returns the value of attribute max_age_in_seconds.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ CorsRule
constructor
A new instance of CorsRule.
Constructor Details
#initialize {|_self| ... } ⇒ CorsRule
Returns a new instance of CorsRule.
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_headers ⇒ Object
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_methods ⇒ Object
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_origins ⇒ Object
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_headers ⇒ Object
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_seconds ⇒ Object
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 |