Class: Dependabot::GithubActions::Requirement

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

Overview

Lifted from the bundler package manager

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*requirements) ⇒ Requirement

Returns a new instance of Requirement.



27
28
29
30
31
32
33
# File 'lib/dependabot/github_actions/requirement.rb', line 27

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



20
21
22
# File 'lib/dependabot/github_actions/requirement.rb', line 20

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