Class: Eco::API::Error::Handler

Inherits:
UseCases::UseCase show all
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

Methods inherited from UseCases::UseCase

#chainer, #classed_definition, #launch, #source_object

Methods inherited from UseCases::BaseCase

valid_type?, validate_type

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