Exception: Cri::ArgumentList::ArgumentCountMismatchError

Inherits:
Error
  • Object
show all
Defined in:
lib/cri/argument_list.rb

Overview

Error that will be raised when an incorrect number of arguments is given.

Instance Method Summary collapse

Constructor Details

#initialize(expected_count, actual_count) ⇒ ArgumentCountMismatchError

Returns a new instance of ArgumentCountMismatchError



8
9
10
11
# File 'lib/cri/argument_list.rb', line 8

def initialize(expected_count, actual_count)
  @expected_count = expected_count
  @actual_count = actual_count
end

Instance Method Details

#messageObject



13
14
15
# File 'lib/cri/argument_list.rb', line 13

def message
  "incorrect number of arguments given: expected #{@expected_count}, but got #{@actual_count}"
end