Class: Aspera::Keychain::Base
- Inherits:
-
Object
- Object
- Aspera::Keychain::Base
- Defined in:
- lib/aspera/keychain/base.rb
Direct Known Subclasses
Constant Summary collapse
- CONTENT_KEYS =
%i[label username password url description].freeze
Instance Method Summary collapse
Instance Method Details
#validate_set(options) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/aspera/keychain/base.rb', line 7 def validate_set() Aspera.assert_type(, Hash){'options'} unsupported = .keys - CONTENT_KEYS Aspera.assert(unsupported.empty?){"unsupported options: #{unsupported}, use #{CONTENT_KEYS.join(', ')}"} .each_pair do |k, v| Aspera.assert_type(v, String){k.to_s} end Aspera.assert(.key?(:label)){'label is required'} end |