Class: Dependabot::GitSubmodules::Requirement

Inherits:
Requirement
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/git_submodules/requirement.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*requirements) ⇒ Requirement

Returns a new instance of Requirement.



25
26
27
28
29
30
31
# File 'lib/dependabot/git_submodules/requirement.rb', line 25

def initialize(*requirements)
  requirements = requirements.flatten.flat_map do |req_string|
    req_string&.split(",")&.map(&:strip)
  end

  super(requirements)
end

Class Method Details

.requirements_array(requirement_string) ⇒ Object



18
19
20
# File 'lib/dependabot/git_submodules/requirement.rb', line 18

def self.requirements_array(requirement_string)
  [new(requirement_string)]
end