Class: RubyLsp::Requests::Support::Annotation
- Inherits:
-
Object
- Object
- RubyLsp::Requests::Support::Annotation
- Defined in:
- lib/ruby_lsp/requests/support/annotation.rb
Instance Method Summary collapse
-
#initialize(arity:, receiver: false) ⇒ Annotation
constructor
: (arity: (Integer | Range), ?receiver: bool) -> void.
-
#match?(node) ⇒ Boolean
: (Prism::CallNode node) -> bool.
Constructor Details
#initialize(arity:, receiver: false) ⇒ Annotation
: (arity: (Integer | Range), ?receiver: bool) -> void
9 10 11 12 |
# File 'lib/ruby_lsp/requests/support/annotation.rb', line 9 def initialize(arity:, receiver: false) @arity = arity @receiver = receiver end |
Instance Method Details
#match?(node) ⇒ Boolean
: (Prism::CallNode node) -> bool
15 16 17 |
# File 'lib/ruby_lsp/requests/support/annotation.rb', line 15 def match?(node) receiver_matches?(node) && arity_matches?(node) end |