mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-04 05:42:15 +08:00
14 lines
309 B
Ruby
14 lines
309 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Serializers::SshPublicKey < Serializers::Base
|
|
def self.serialize_internal(ssh_public_key, options = {})
|
|
h = {
|
|
id: ssh_public_key.ubid,
|
|
name: ssh_public_key.name
|
|
}
|
|
|
|
h[:public_key] = ssh_public_key.public_key if options[:detailed]
|
|
|
|
h
|
|
end
|
|
end
|