Class: Solargraph::Pin::Block
Instance Attribute Summary collapse
- #parameters ⇒ Array<String> readonly
-
#receiver ⇒ Parser::AST::Node
readonly
The signature of the method that receives this block.
Attributes inherited from Base
#location, #name, #namespace, #path
Instance Method Summary collapse
-
#initialize(location, namespace, name, comments, receiver, context) ⇒ Block
constructor
A new instance of Block.
- #kind ⇒ Object
- #nearly?(other) ⇒ Boolean
Methods inherited from Base
#==, #comments, #completion_item_kind, #context, #deprecated?, #directives, #docstring, #filename, #infer, #macros, #maybe_directives?, #return_complex_type, #return_type, #symbol_kind, #to_s, #try_merge!, #variable?
Methods included from Documenting
Methods included from Conversions
#completion_item, #detail, #link_documentation, #reset_conversions, #resolve_completion_item, #signature_help
Constructor Details
#initialize(location, namespace, name, comments, receiver, context) ⇒ Block
Returns a new instance of Block.
12 13 14 15 16 |
# File 'lib/solargraph/pin/block.rb', line 12 def initialize location, namespace, name, comments, receiver, context super(location, namespace, name, comments) @receiver = receiver @context = context end |
Instance Attribute Details
#parameters ⇒ Array<String> (readonly)
10 11 12 |
# File 'lib/solargraph/pin/block.rb', line 10 def parameters @parameters end |
#receiver ⇒ Parser::AST::Node (readonly)
The signature of the method that receives this block.
7 8 9 |
# File 'lib/solargraph/pin/block.rb', line 7 def receiver @receiver end |
Instance Method Details
#nearly?(other) ⇒ Boolean
26 27 28 29 30 31 |
# File 'lib/solargraph/pin/block.rb', line 26 def nearly? other return false unless super # @todo Trying to not to block merges too much # receiver == other.receiver and parameters == other.parameters true end |