Exception: Foobara::CommandPatternImplementation::Concerns::DomainMappers::NoDomainMapperFoundError

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(subcommand, to) ⇒ NoDomainMapperFoundError

Returns a new instance of NoDomainMapperFoundError.



32
33
34
35
36
37
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb', line 32

def initialize(subcommand, to)
  self.subcommand = subcommand
  self.to = to

  super()
end

Instance Attribute Details

#subcommandObject

Returns the value of attribute subcommand.



30
31
32
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb', line 30

def subcommand
  @subcommand
end

#toObject

Returns the value of attribute to.



30
31
32
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb', line 30

def to
  @to
end

Instance Method Details

#contextObject



39
40
41
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb', line 39

def context
  { subcommand_name: subcommand.name, to: }
end

#messageObject



43
44
45
# File 'foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb', line 43

def message
  "No DomainMapper found that maps to #{subcommand.name} or from its result"
end