Class: Dependabot::UpdateCheckers::VulnerabilityAudit::BlockingDependency

Inherits:
T::ImmutableStruct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/update_checkers/vulnerability_audit.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_object(value) ⇒ Object



142
143
144
145
146
147
148
149
150
# File 'lib/dependabot/update_checkers/vulnerability_audit.rb', line 142

def self.from_object(value)
  hash = ValueParser.object_hash(value, "blocking dependency")
  new(
    name: ValueParser.string(hash, "name", context: "blocking dependency"),
    version: ValueParser.string(hash, "version", context: "blocking dependency"),
    requirement: ValueParser.string(hash, "requirement", context: "blocking dependency"),
    top_level_ancestor: ValueParser.string(hash, "top_level_ancestor", context: "blocking dependency")
  )
end

Instance Method Details

#to_hObject



153
154
155
156
157
158
159
160
# File 'lib/dependabot/update_checkers/vulnerability_audit.rb', line 153

def to_h
  {
    "name" => name,
    "version" => version,
    "requirement" => requirement,
    "top_level_ancestor" => top_level_ancestor
  }
end