Class: WebAuthn::PublicKeyCredential::Entity

Inherits:
Object
  • Object
show all
Defined in:
lib/webauthn/public_key_credential/entity.rb

Direct Known Subclasses

RPEntity, UserEntity

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, icon: nil) ⇒ Entity

Returns a new instance of Entity.



10
11
12
13
# File 'lib/webauthn/public_key_credential/entity.rb', line 10

def initialize(name:, icon: nil)
  @name = name
  @icon = icon
end

Instance Attribute Details

#iconObject (readonly)

Returns the value of attribute icon.



8
9
10
# File 'lib/webauthn/public_key_credential/entity.rb', line 8

def icon
  @icon
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/webauthn/public_key_credential/entity.rb', line 8

def name
  @name
end

Instance Method Details

#as_jsonObject



15
16
17
# File 'lib/webauthn/public_key_credential/entity.rb', line 15

def as_json
  to_hash.to_camelback_keys
end