Skip to content

Commit 4173a44

Browse files
committed
Translate abstract signatures to RBS comments
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
1 parent 5393ca3 commit 4173a44

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

lib/spoom/coverage/d3/base.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module Coverage
66
module D3
77
# @abstract
88
class Base
9-
extend T::Sig
109
#: String
1110
attr_reader :id
1211

@@ -41,7 +40,8 @@ def tooltip
4140
""
4241
end
4342

44-
sig { abstract.returns(String) }
43+
# @abstract
44+
#: -> String
4545
def script; end
4646
end
4747
end

lib/spoom/coverage/d3/timeline.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ def script
117117
HTML
118118
end
119119

120-
sig { abstract.returns(String) }
120+
# @abstract
121+
#: -> String
121122
def plot; end
122123

123124
#: -> String

lib/spoom/coverage/report.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def get_binding # rubocop:disable Naming/AccessorMethodName
3333

3434
# @abstract
3535
class Page < Template
36-
extend T::Sig
3736
TEMPLATE = "#{Spoom::SPOOM_PATH}/templates/page.erb" #: String
3837

3938
#: String
@@ -69,7 +68,8 @@ def body_html
6968
cards.map(&:html).join("\n")
7069
end
7170

72-
sig { abstract.returns(T::Array[Cards::Card]) }
71+
# @abstract
72+
#: -> Array[Cards::Card]
7373
def cards; end
7474

7575
#: -> String
@@ -80,8 +80,6 @@ def footer_html
8080

8181
module Cards
8282
class Card < Template
83-
extend T::Sig
84-
8583
TEMPLATE = "#{Spoom::SPOOM_PATH}/templates/card.erb" #: String
8684

8785
#: String?
@@ -106,7 +104,8 @@ def html
106104
ERB.new(erb).result(get_binding)
107105
end
108106

109-
sig { abstract.returns(String) }
107+
# @abstract
108+
#: -> String
110109
def erb; end
111110
end
112111

lib/spoom/sorbet/lsp/structures.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module Spoom
88
module LSP
99
# @interface
1010
module PrintableSymbol
11-
extend T::Sig
12-
sig { abstract.params(printer: SymbolPrinter).void }
11+
# @abstract
12+
#: (SymbolPrinter printer) -> void
1313
def accept_printer(printer); end
1414
end
1515

0 commit comments

Comments
 (0)