Exception: Foobara::CommandPatternImplementation::Concerns::DomainMappers::ForgotToDependOnDomainMapperError

Inherits:
RuntimeError
  • Object
show all
Defined in:
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#backtrace_when_initialized, #backtrace_when_raised, #error_key, #is_fatal

Instance Method Summary collapse

Methods inherited from RuntimeError

category, fatal?

Methods inherited from Error

#==, abstract, abstract?, category, context, #eql?, fatal?, #fatal?, foobara_manifest, #key, message, path, #prepend_path!, runtime_path, subclass, symbol, to_h, #to_h, types_depended_on

Methods included from Foobara::Concern

foobara_class_methods_module_for, foobara_concern?, included

Constructor Details

#initialize(mapper) ⇒ ForgotToDependOnDomainMapperError

Returns a new instance of ForgotToDependOnDomainMapperError.



10
11
12
13
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb', line 10

def initialize(mapper)
  self.mapper = mapper
  super()
end

Instance Attribute Details

#mapperObject

Returns the value of attribute mapper.



8
9
10
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb', line 8

def mapper
  @mapper
end

Instance Method Details

#contextObject



15
16
17
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb', line 15

def context
  { mapper_name: mapper.name }
end

#messageObject



19
20
21
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb', line 19

def message
  "Did you maybe forget to add depends_on #{mapper.name}?"
end