Exception: Simple::Service::MissingArgumentError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/simple/service/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action, parameters) ⇒ MissingArgumentError

Returns a new instance of MissingArgumentError.



25
26
27
28
# File 'lib/simple/service/errors.rb', line 25

def initialize(action, parameters)
  @action, @parameters = action, parameters
  super()
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



22
23
24
# File 'lib/simple/service/errors.rb', line 22

def action
  @action
end

#parametersObject (readonly)

Returns the value of attribute parameters.



23
24
25
# File 'lib/simple/service/errors.rb', line 23

def parameters
  @parameters
end

Instance Method Details

#to_sObject



30
31
32
# File 'lib/simple/service/errors.rb', line 30

def to_s
  "#{action}: missing argument(s): #{parameters.map(&:to_s).join(", ")}"
end