Class: Eco::API::Error::Handler
- Inherits:
-
UseCases::UseCase
- Object
- UseCases::BaseCase
- UseCases::UseCase
- Eco::API::Error::Handler
- Defined in:
- lib/eco/api/error/handler.rb
Instance Attribute Summary
Attributes inherited from UseCases::UseCase
#name, #options, #times_launched, #type
Instance Method Summary collapse
-
#initialize(name, type: :error_handler, root:, &block) ⇒ Handler
constructor
A new instance of Handler.
- #root=(value) ⇒ Object
Methods inherited from UseCases::UseCase
Methods inherited from UseCases::BaseCase
Methods included from Common::ClassHelpers
#class_resolver, #descendants, #descendants?, #inheritable_attrs, #inheritable_class_vars, #inherited, #instance_variable_name, #new_class, #resolve_class, #to_constant
Constructor Details
#initialize(name, type: :error_handler, root:, &block) ⇒ Handler
Returns a new instance of Handler.
7 8 9 |
# File 'lib/eco/api/error/handler.rb', line 7 def initialize(name, type: :error_handler, root:, &block) super(name, type: type, root: root, &block) end |
Instance Method Details
#root=(value) ⇒ Object
11 12 13 14 |
# File 'lib/eco/api/error/handler.rb', line 11 def root=(value) raise "Root should be a Eco::API::Error::Handlers object. Given: #{value}" if !value.is_a?(Eco::API::Error::Handlers) @root = value end |