class BehaviorTree::NodeTypeDoesNotExistError

Exception for incorrect node type when using the DSL builder.

Public Class Methods

new(missing_method, suggestion, method_alias) click to toggle source
Calls superclass method
# File lib/behavior_tree/errors.rb, line 38
def initialize(missing_method, suggestion, method_alias)
  suggestion = suggestion.to_s
  method_alias = method_alias.to_s

  err = ["Node type '#{missing_method}' does not exist."]
  unless suggestion.empty?
    alias_text = method_alias.empty? ? '' : " (alias of #{method_alias})"
    err << "Did you mean '#{suggestion}'#{alias_text}?"
  end

  super err.join ' '
end