Class: Steep::Diagnostic::Ruby::InsufficientPositionalArguments
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(node:, params:) ⇒ InsufficientPositionalArguments
constructor
A new instance of InsufficientPositionalArguments.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, params:) ⇒ InsufficientPositionalArguments
Returns a new instance of InsufficientPositionalArguments.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/steep/diagnostic/ruby.rb', line 111 def initialize(node:, params:) send = case node.type when :send, :csend node when :block, :numblock node.children[0] end loc = if send send.loc.selector.with(end_pos: send.loc.expression.end_pos) # steep:ignore NoMethod else node.loc.expression end super(node: node, location: loc) @params = params end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
108 109 110 |
# File 'lib/steep/diagnostic/ruby.rb', line 108 def node @node end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
109 110 111 |
# File 'lib/steep/diagnostic/ruby.rb', line 109 def params @params end |
Instance Method Details
#header_line ⇒ Object
129 130 131 |
# File 'lib/steep/diagnostic/ruby.rb', line 129 def header_line "More positional arguments are required" end |