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 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)


129
130
131
# File 'lib/yobi/repository/key.rb', line 129

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

#current?Boolean

Returns whether this is the key currently in use.

Returns:

  • (Boolean)

    whether this is the key currently in use



124
125
126
# File 'lib/yobi/repository/key.rb', line 124

def current?
  self["current"]
end

#host_nameString

Returns:

  • (String)


119
120
121
# File 'lib/yobi/repository/key.rb', line 119

def host_name
  self["hostName"]
end

#idString

Returns:

  • (String)


109
110
111
# File 'lib/yobi/repository/key.rb', line 109

def id
  self["id"]
end

#user_nameString

Returns:

  • (String)


114
115
116
# File 'lib/yobi/repository/key.rb', line 114

def user_name
  self["userName"]
end