Class: ClowderCommonRuby::ObjectStoreBucket

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/clowder-common-ruby/types.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ ObjectStoreBucket

Returns a new instance of ObjectStoreBucket.



299
300
301
302
303
304
305
306
307
308
# File 'lib/clowder-common-ruby/types.rb', line 299

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_keysObject



310
311
312
313
314
315
316
317
318
319
320
# File 'lib/clowder-common-ruby/types.rb', line 310

def valid_keys
  [].tap do |keys|
    keys << :accessKey
    keys << :secretKey
    keys << :region
    keys << :requestedName
    keys << :name
    keys << :tls
    keys << :endpoint
  end
end