Class: ClowderCommonRuby::ObjectStoreBucket
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- ClowderCommonRuby::ObjectStoreBucket
- Defined in:
- lib/clowder-common-ruby/types.rb
Instance Method Summary collapse
-
#initialize(attributes) ⇒ ObjectStoreBucket
constructor
A new instance of ObjectStoreBucket.
- #valid_keys ⇒ Object
Constructor Details
#initialize(attributes) ⇒ ObjectStoreBucket
Returns a new instance of ObjectStoreBucket.
291 292 293 294 295 296 297 298 299 300 |
# File 'lib/clowder-common-ruby/types.rb', line 291 def initialize(attributes) super raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash)) attributes = attributes.each_with_object({}) do |(k, v), h| warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym) h[k.to_sym] = v end end |
Instance Method Details
#valid_keys ⇒ Object
302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/clowder-common-ruby/types.rb', line 302 def valid_keys [].tap do |keys| keys << :accessKey keys << :secretKey keys << :region keys << :requestedName keys << :name keys << :tls keys << :endpoint end end |