Module: Kontena::Cli::Config::TokenSerializer

Included in:
Account, Server
Defined in:
lib/kontena/cli/config.rb

Instance Method Summary collapse

Instance Method Details

#to_hHash

Modified to_h to handle token data serialization

Returns:

  • (Hash)


534
535
536
537
538
539
540
541
542
# File 'lib/kontena/cli/config.rb', line 534

def to_h
  token = delete_field(:token) if respond_to?(:token)
  result = super
  if token
    self.token = token
    result.merge!(token.to_h)
  end
  result
end