Module: Foobara::TypeDeclarations::ErrorExtension::ClassMethods

Defined in:
foobara-0.0.110/projects/type_declarations/src/error_extension.rb

Instance Method Summary collapse

Instance Method Details

#context_typeObject



36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'foobara-0.0.110/projects/type_declarations/src/error_extension.rb', line 36

def context_type
  @context_type ||= begin
    Foobara::Domain.foobara_type_from_declaration(self, context_type_declaration)
  rescue NoContextTypeSetError
    if abstract?
      nil
    else
      # :nocov:
      raise
      # :nocov:
    end
  end
end

#context_type_declarationObject



50
51
52
53
54
# File 'foobara-0.0.110/projects/type_declarations/src/error_extension.rb', line 50

def context_type_declaration
  # :nocov:
  raise NoContextTypeSetError
  # :nocov:
end