Exception: Simple::Service::MissingArguments
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- ArgumentError
- Simple::Service::MissingArguments
- Defined in:
- lib/simple/service/errors.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
Instance Method Summary collapse
-
#initialize(action, parameters) ⇒ MissingArguments
constructor
A new instance of MissingArguments.
- #to_s ⇒ Object
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
#action ⇒ Object (readonly)
Returns the value of attribute action.
20 21 22 |
# File 'lib/simple/service/errors.rb', line 20 def action @action end |
#parameters ⇒ Object (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_s ⇒ Object
27 28 29 |
# File 'lib/simple/service/errors.rb', line 27 def to_s "#{action}: missing argument(s): #{parameters.map(&:to_s).join(", ")}" end |