Exception: SFRP::Raw::AmbiguousNameError

Inherits:
CompileError
  • Object
show all
Defined in:
lib/sfrp/raw/exception.rb

Instance Method Summary collapse

Constructor Details

#initialize(target_str, selection_strs, source_position) ⇒ AmbiguousNameError

Returns a new instance of AmbiguousNameError.



17
18
19
20
21
# File 'lib/sfrp/raw/exception.rb', line 17

def initialize(target_str, selection_strs, source_position)
  @target_str = target_str
  @selection_strs = selection_strs
  @source_position = source_position
end

Instance Method Details

#messageObject



23
24
25
26
# File 'lib/sfrp/raw/exception.rb', line 23

def message
  "Ambiguous name '#{@target_str}':\n" +
  @selection_strs.map { |s| '  ' + s }.join("\n")
end