Class: ClowderCommonRuby::DependencyEndpointV2

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

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ DependencyEndpointV2

Returns a new instance of DependencyEndpointV2.



484
485
486
487
488
489
490
491
492
493
# File 'lib/clowder-common-ruby/types.rb', line 484

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



495
496
497
498
499
500
501
# File 'lib/clowder-common-ruby/types.rb', line 495

def valid_keys
  [].tap do |keys|
    keys << :uri
    keys << :ca_certificate
    keys << :authenticated
  end
end