Exception: KXI::Exceptions::VerbExpectedException

Inherits:
Exception
  • Object
show all
Defined in:
lib/kxi/exceptions/verb_expected_exception.rb

Overview

Raised when specific verb was expected

Instance Method Summary collapse

Constructor Details

#initialize(verbs) ⇒ VerbExpectedException

Instantiates the CLI::VerbExpectedException class

Parameters:

  • verbs (Array<String>)

    Expected verbs



15
16
17
18
# File 'lib/kxi/exceptions/verb_expected_exception.rb', line 15

def initialize(verbs)
	super("Expected verb! (#{verbs.join(', ')})")
	@verbs = verbs
end

Instance Method Details

#verbsArray<String>

Gets array of verbs that were expected

Returns:

  • (Array<String>)

    Expected verbs



9
10
11
# File 'lib/kxi/exceptions/verb_expected_exception.rb', line 9

def verbs
	@verbs
end