Exception: Simple::Service::MissingArguments

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) ⇒ MissingArguments

Returns a new instance of MissingArguments.



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

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

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



20
21
22
# File 'lib/simple/service/errors.rb', line 20

def action
  @action
end

#parametersObject (readonly)

Returns the value of attribute parameters.



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

def parameters
  @parameters
end

Instance Method Details

#to_sObject



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

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