Class: Steep::Diagnostic::Ruby::UnexpectedKeywordArgument
- 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:) ⇒ UnexpectedKeywordArgument
constructor
A new instance of UnexpectedKeywordArgument.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, params:) ⇒ UnexpectedKeywordArgument
Returns a new instance of UnexpectedKeywordArgument.
138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/steep/diagnostic/ruby.rb', line 138 def initialize(node:, params:) loc = case node.type when :pair node.children[0].location.expression when :kwsplat node.location.expression else raise end super(node: node, location: loc) @params = params end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
135 136 137 |
# File 'lib/steep/diagnostic/ruby.rb', line 135 def node @node end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
136 137 138 |
# File 'lib/steep/diagnostic/ruby.rb', line 136 def params @params end |
Instance Method Details
#header_line ⇒ Object
151 152 153 |
# File 'lib/steep/diagnostic/ruby.rb', line 151 def header_line "Unexpected keyword argument" end |