Class: Steep::Errors::UnexpectedKeyword

Inherits:
Base
  • Object
show all
Defined in:
lib/steep/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#node

Instance Method Summary collapse

Methods inherited from Base

#location_to_str, #print_to

Constructor Details

#initialize(node:, unexpected_keywords:) ⇒ UnexpectedKeyword

Returns a new instance of UnexpectedKeyword.



524
525
526
527
# File 'lib/steep/errors.rb', line 524

def initialize(node:, unexpected_keywords:)
  super(node: node)
  @unexpected_keywords = unexpected_keywords
end

Instance Attribute Details

#unexpected_keywordsObject (readonly)

Returns the value of attribute unexpected_keywords.



522
523
524
# File 'lib/steep/errors.rb', line 522

def unexpected_keywords
  @unexpected_keywords
end

Instance Method Details

#to_sObject



529
530
531
# File 'lib/steep/errors.rb', line 529

def to_s
  "#{location_to_str}: UnexpectedKeyword: #{unexpected_keywords.to_a.join(", ")}"
end