Exception: Mothership::TypeMismatch

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

Instance Method Summary collapse

Constructor Details

#initialize(cmd, input, type) ⇒ TypeMismatch

Returns a new instance of TypeMismatch.



28
29
30
31
32
# File 'lib/mothership/errors.rb', line 28

def initialize(cmd, input, type)
  @command = cmd
  @input = input
  @type = type
end

Instance Method Details

#to_sObject



34
35
36
# File 'lib/mothership/errors.rb', line 34

def to_s
  "#{@command.display_name}: expected #{@type} value for #{@input}"
end