Class: RuboCop::Cop::Sorbet::ForbidTLet
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Sorbet::ForbidTLet
- Defined in:
- lib/rubocop/cop/sorbet/forbid_t_let.rb
Overview
Disallows using ‘T.let` anywhere.
Constant Summary collapse
- MSG =
"Do not use `T.let`."- RESTRICT_ON_SEND =
[:let].freeze
Instance Method Summary collapse
- #on_send(node) ⇒ Object (also: #on_csend)
- #t_let?(node) ⇒ Object
Instance Method Details
#on_send(node) ⇒ Object Also known as: on_csend
24 25 26 |
# File 'lib/rubocop/cop/sorbet/forbid_t_let.rb', line 24 def on_send(node) add_offense(node) if t_let?(node) end |
#t_let?(node) ⇒ Object
22 |
# File 'lib/rubocop/cop/sorbet/forbid_t_let.rb', line 22 def_node_matcher(:t_let?, "(send (const nil? :T) :let _ _)") |