Exception: Pablo::WrongArgumentError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Pablo::WrongArgumentError
- Defined in:
- lib/pablo/errors.rb
Instance Method Summary collapse
-
#initialize(name, arg = nil, type = nil) ⇒ WrongArgumentError
constructor
A new instance of WrongArgumentError.
- #to_s ⇒ Object
Constructor Details
#initialize(name, arg = nil, type = nil) ⇒ WrongArgumentError
Returns a new instance of WrongArgumentError.
39 40 41 |
# File 'lib/pablo/errors.rb', line 39 def initialize name, arg = nil, type = nil @name, @arg, @type = name, arg, type end |
Instance Method Details
#to_s ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lib/pablo/errors.rb', line 43 def to_s (@arg ? "Wrong argument '#{@arg}' for '#{@name}'." : "Wrong argument for '#{@name}'.") + (@type ? " Expected #{@type}." : '') end |