Class: Sigstore::TUF::Targets::Delegations

Inherits:
Object
  • Object
show all
Defined in:
lib/sigstore/tuf/targets.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Delegations

Returns a new instance of Delegations.



66
67
68
69
# File 'lib/sigstore/tuf/targets.rb', line 66

def initialize(data)
  keys = Keys.new data.fetch("keys", {})
  @roles = Roles.new data.fetch("roles", []), keys
end

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


75
76
77
# File 'lib/sigstore/tuf/targets.rb', line 75

def any?
  @roles.any?
end

#fetch(name) ⇒ Object



79
80
81
# File 'lib/sigstore/tuf/targets.rb', line 79

def fetch(name)
  @roles.fetch(name)
end

#roles_for_target(target_path) ⇒ Object



71
72
73
# File 'lib/sigstore/tuf/targets.rb', line 71

def roles_for_target(target_path)
  @roles.for_target(target_path)
end