Exception: GQL::Errors::UndefinedCall

Inherits:
GQL::Error
  • Object
show all
Defined in:
lib/gql/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(id, node_class) ⇒ UndefinedCall



37
38
39
40
41
42
# File 'lib/gql/errors.rb', line 37

def initialize(id, node_class)
  calls = node_class.calls.keys.sort.map { |id| "`#{id}`" }
  calls = calls.size > 0 ? " Available calls: #{calls.to_sentence}." : ''

  super("#{node_class} has no call named `#{id}`.#{calls}")
end