Files
git.stella-ops.org/src/Scanner/__Libraries/StellaOps.Scanner.Analyzers.Lang.Ruby/Internal/RubyLockData.cs
master 56c687253f
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
feat(ruby): Implement RubyManifestParser for parsing gem groups and dependencies
feat(ruby): Add RubyVendorArtifactCollector to collect vendor artifacts

test(deno): Add golden tests for Deno analyzer with various fixtures

test(deno): Create Deno module and package files for testing

test(deno): Implement Deno lock and import map for dependency management

test(deno): Add FFI and worker scripts for Deno testing

feat(ruby): Set up Ruby workspace with Gemfile and dependencies

feat(ruby): Add expected output for Ruby workspace tests

feat(signals): Introduce CallgraphManifest model for signal processing
2025-11-10 09:27:03 +02:00

35 lines
1.0 KiB
C#

namespace StellaOps.Scanner.Analyzers.Lang.Ruby.Internal;
internal sealed class RubyLockData
{
private RubyLockData(IReadOnlyList<RubyLockEntry> entries, string bundledWith)
{
Entries = entries;
BundledWith = bundledWith ?? string.Empty;
}
public IReadOnlyList<RubyLockEntry> Entries { get; }
public string BundledWith { get; }
public bool IsEmpty => Entries.Count == 0;
public static ValueTask<RubyLockData> LoadAsync(LanguageAnalyzerContext context, CancellationToken cancellationToken)
{
ArgumentNullException.ThrowIfNull(context);
return RubyLockCollector.LoadAsync(context, cancellationToken);
}
public static RubyLockData Create(IReadOnlyList<RubyLockEntry> entries, string bundledWith)
{
if (entries.Count == 0 && string.IsNullOrWhiteSpace(bundledWith))
{
return Empty;
}
return new RubyLockData(entries, bundledWith);
}
public static RubyLockData Empty { get; } = new(Array.Empty<RubyLockEntry>(), string.Empty);
}