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.



510
511
512
513
# File 'lib/steep/errors.rb', line 510

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.



508
509
510
# File 'lib/steep/errors.rb', line 508

def unexpected_keywords
  @unexpected_keywords
end

Instance Method Details

#to_sObject



515
516
517
# File 'lib/steep/errors.rb', line 515

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