Class: ClowderCommonRuby::PrivateDependencyEndpoint
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- ClowderCommonRuby::PrivateDependencyEndpoint
- Defined in:
- lib/clowder-common-ruby/types.rb
Instance Method Summary collapse
-
#initialize(attributes) ⇒ PrivateDependencyEndpoint
constructor
A new instance of PrivateDependencyEndpoint.
- #valid_keys ⇒ Object
Constructor Details
#initialize(attributes) ⇒ PrivateDependencyEndpoint
Returns a new instance of PrivateDependencyEndpoint.
415 416 417 418 419 420 421 422 423 424 |
# File 'lib/clowder-common-ruby/types.rb', line 415 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
426 427 428 429 430 431 432 433 434 |
# File 'lib/clowder-common-ruby/types.rb', line 426 def valid_keys [].tap do |keys| keys << :name keys << :hostname keys << :port keys << :app keys << :tlsPort end end |