rbi 0.0.17 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b377a351b9385e3c256fa079584f193232a767df408850e72265db4319346aa9
4
- data.tar.gz: 04a3e0cd339374e9ccc3f0d2d769e564730ad69881c73c4f42ae328db48bcad5
3
+ metadata.gz: 6a2cb2f6b2287a3faed50161d70e0c863892c88c6eef5a3c798ccf8e16e0c441
4
+ data.tar.gz: e851f3b85aa62534a3a1c867085add40aa7669df3b003f17e62eb81ce36c58ed
5
5
  SHA512:
6
- metadata.gz: e9123353786e09d5869e8621f086ef057d57b21ff8a05ddb6c1be3dffa5dc0d94bc433e0074f0e7b4dff0eb63ed66d300ab11856d536a299f8560ec53912f444
7
- data.tar.gz: 6a12ef064826678ce3a47b6a1d327e8de0b506fd09c100f4f88111afe6b84d11549cf41ef727a70bb9b93e16dd1868a00f3ed7a3e5b9e10578e159a7aafa2c04
6
+ metadata.gz: b566ecfc9c01ebf7524efb055302e3da780caf0e0cc3ab36bdca798ff8390cce5247bce1318c5373c8339fede498f3bc87ffd5071ace658880c0b3724a9f1d15
7
+ data.tar.gz: d95c6b6ea53cf84c348b2426b9bf10ad8213282f48ec9364cb9b1512aef9dd4c896d18c09c1dac79abe40f136194ab550571ac141e960eab61e4026bdbf3c578
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ group(:development, :test) do
10
10
  gem("minitest")
11
11
  gem("minitest-reporters")
12
12
  gem("rake", "~> 13.0")
13
- gem("rubocop", "~> 1.54", require: false)
13
+ gem("rubocop", "~> 1.56", require: false)
14
14
  gem("rubocop-shopify", require: false)
15
15
  gem("rubocop-sorbet", require: false)
16
16
  gem("sorbet", ">= 0.5.9204", require: false)
data/lib/rbi/loc.rb CHANGED
@@ -5,6 +5,21 @@ module RBI
5
5
  class Loc
6
6
  extend T::Sig
7
7
 
8
+ class << self
9
+ extend T::Sig
10
+
11
+ sig { params(file: String, yarp_location: YARP::Location).returns(Loc) }
12
+ def from_yarp(file, yarp_location)
13
+ new(
14
+ file: file,
15
+ begin_line: yarp_location.start_line,
16
+ end_line: yarp_location.end_line,
17
+ begin_column: yarp_location.start_column,
18
+ end_column: yarp_location.end_column + 1, # TODO: Why is this off by one?
19
+ )
20
+ end
21
+ end
22
+
8
23
  sig { returns(T.nilable(String)) }
9
24
  attr_reader :file
10
25