Class: SupplyChain
- Inherits:
-
Object
- Object
- SupplyChain
- Defined in:
- lib/supply_chain.rb
Instance Method Summary collapse
- #analyze(workflows) ⇒ Object
-
#initialize(token: nil) ⇒ SupplyChain
constructor
A new instance of SupplyChain.
Constructor Details
#initialize(token: nil) ⇒ SupplyChain
Returns a new instance of SupplyChain.
7 8 9 10 |
# File 'lib/supply_chain.rb', line 7 def initialize(token: nil) @token = token || ENV["GITHUB_TOKEN"] @cache = {} end |
Instance Method Details
#analyze(workflows) ⇒ Object
12 13 14 15 |
# File 'lib/supply_chain.rb', line 12 def analyze(workflows) actions = extract_actions(workflows) actions.map { |a| enrich(a) } end |