Class: Keybase::Local::User

Inherits:
Object
  • Object
show all
Defined in:
lib/keybase/local/user.rb

Overview

Represents a user known to the local Keybase process. These are (presumably) users that have been logged into locally.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fields) ⇒ User

Returns a new instance of User.

Parameters:

  • fields (Hash)

    the user's configuration fields

Options Hash (fields):

  • device (String)

    the device's unique identifier

  • id (String)

    the user's unique identifier

  • name (String)

    the user's Keybase username

  • salt (String)

    some kind of salt



26
27
28
29
30
31
# File 'lib/keybase/local/user.rb', line 26

def initialize(fields)
  @device = fields["device"]
  @id     = fields["id"]
  @name   = fields["name"]
  @salt   = fields["salt"]
end

Instance Attribute Details

#deviceString (readonly)

Returns the device's unique identifier.

Returns:

  • (String)

    the device's unique identifier



9
10
11
# File 'lib/keybase/local/user.rb', line 9

def device
  @device
end

#idString (readonly)

Returns the user's unique identifier.

Returns:

  • (String)

    the user's unique identifier



12
13
14
# File 'lib/keybase/local/user.rb', line 12

def id
  @id
end

#nameString (readonly)

Returns the user's Keybase username.

Returns:

  • (String)

    the user's Keybase username



15
16
17
# File 'lib/keybase/local/user.rb', line 15

def name
  @name
end

#saltString (readonly)

Note:

I have no idea what this field does.

Returns some kind of salt.

Returns:

  • (String)

    some kind of salt



19
20
21
# File 'lib/keybase/local/user.rb', line 19

def salt
  @salt
end