Class: Yobi::Key

Inherits:
FancyHash show all
Defined in:
lib/yobi/repository/key.rb,
sig/yobi.rbs

Overview

One key (password) associated with the repository, from Yobi::Repository#key_list.

Instance Method Summary collapse

Methods inherited from FancyHash

#initialize, #inspect, #pretty_print

Constructor Details

This class inherits a constructor from Yobi::FancyHash

Instance Method Details

#createdTime

Returns:

  • (Time)


116
117
118
# File 'lib/yobi/repository/key.rb', line 116

def created
  @created ||= Time.parse(self["created"])
end

#current?Boolean

Whether this is the key currently in use.

Returns:

  • (Boolean)


112
113
114
# File 'lib/yobi/repository/key.rb', line 112

def current?
  self["current"]
end

#host_nameString

Returns:

  • (String)


107
108
109
# File 'lib/yobi/repository/key.rb', line 107

def host_name
  self["hostName"]
end

#idString

Returns:

  • (String)


99
100
101
# File 'lib/yobi/repository/key.rb', line 99

def id
  self["id"]
end

#user_nameString

Returns:

  • (String)


103
104
105
# File 'lib/yobi/repository/key.rb', line 103

def user_name
  self["userName"]
end