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.



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

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.



513
514
515
# File 'lib/steep/errors.rb', line 513

def unexpected_keywords
  @unexpected_keywords
end

Instance Method Details

#to_sObject



520
521
522
# File 'lib/steep/errors.rb', line 520

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