# Exception: Cri::ArgumentList::ArgumentCountMismatchError

Inherits:
  Error
  - Object
  - StandardError
  - Error
  - Cri::ArgumentList::ArgumentCountMismatchError
  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

- #initialize(expected_count, actual_count) ⇒ ArgumentCountMismatchError constructor

  A new instance of ArgumentCountMismatchError.

- #message ⇒ Object

## 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

### #message ⇒ `Object`

    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