Exception: Simple::Service::NoSuchActionError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Simple::Service::NoSuchActionError
- Defined in:
- lib/simple/service/errors.rb
Overview
Will be raised by ::Simple::Service.action.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
-
#initialize(service, name) ⇒ NoSuchActionError
constructor
A new instance of NoSuchActionError.
- #to_s ⇒ Object
Constructor Details
#initialize(service, name) ⇒ NoSuchActionError
6 7 8 9 |
# File 'lib/simple/service/errors.rb', line 6 def initialize(service, name) @service, @name = service, name super() end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/simple/service/errors.rb', line 4 def name @name end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
4 5 6 |
# File 'lib/simple/service/errors.rb', line 4 def service @service end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 |
# File 'lib/simple/service/errors.rb', line 11 def to_s action_names = ::Simple::Service.actions(service).keys.sort informal = "service #{service} has these actions: #{action_names.map(&:inspect).join(", ")}" "No such action #{name.inspect}; #{informal}" end |