Exception: Kiba::Extend::JobCannotBeUsedAsLookupError

Inherits:
TypeError
  • Object
show all
Includes:
ErrMod
Defined in:
lib/kiba/extend/error.rb

Instance Method Summary collapse

Methods included from ErrMod

#calling_job, #info

Constructor Details

#initialize(key, klass, for_job) ⇒ JobCannotBeUsedAsLookupError

Returns a new instance of JobCannotBeUsedAsLookupError.



52
53
54
55
56
57
58
59
60
# File 'lib/kiba/extend/error.rb', line 52

def initialize(key, klass, for_job)
  @key = key
  @klass = klass
  @for_job = for_job
  @msg = ":#{key} cannot be used as a lookup in :#{for_job} because "\
    "its src_class (#{klass}) does not include "\
    "Kiba::Extend::Soures::Lookupable"
  super(msg)
end

Instance Method Details

#formattedObject



62
63
64
65
66
67
# File 'lib/kiba/extend/error.rb', line 62

def formatted
  <<~STR
    JOB FAILED: LOOKUP FILE SETUP ERROR FOR: #{for_job}
      #{msg}
  STR
end