Exception: Pablo::MissingArgumentError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/pablo/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, arg = nil) ⇒ MissingArgumentError

Returns a new instance of MissingArgumentError.



27
28
29
# File 'lib/pablo/errors.rb', line 27

def initialize name, arg = nil
    @name, @arg = name, arg
end

Instance Method Details

#to_sObject



31
32
33
34
35
# File 'lib/pablo/errors.rb', line 31

def to_s
    @arg ?
        "Missing argument '#{@arg}' for '#{@name}'." :
        "Missing argument for '#{@name}'."
end