Skip to content

Commit 3499d16

Browse files
committed
Ruby: Add missing QLDoc
1 parent 0597b2e commit 3499d16

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ruby/ql/lib/codeql/ruby/frameworks/Gemfile.qll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Provides classes and predicates for Gemfiles, including version constraint logic.
3+
*/
4+
15
private import codeql.ruby.AST
26

37
/**
@@ -19,6 +23,9 @@ module Gemfile {
1923
class Gem extends MethodCall {
2024
Gem() { this.getMethodName() = "gem" and this.getFile() = getGemfile() }
2125

26+
/**
27+
* Gets the name of the gem in this version constraint.
28+
*/
2229
string getName() { result = this.getArgument(0).getConstantValue().getStringlikeValue() }
2330

2431
/**
@@ -86,6 +93,10 @@ module Gemfile {
8693
)
8794
}
8895

96+
/**
97+
* A version constraint in a `gem` call. This consists of a version number and an optional comparator, for example
98+
* `>= 1.2.3`.
99+
*/
89100
class VersionConstraint extends string {
90101
Comparator comp;
91102
string versionString;

0 commit comments

Comments
 (0)