Class: Muwu::ProjectException::MetadataValueNotGiven

Inherits:
Object
  • Object
show all
Includes:
Muwu
Defined in:
lib/muwu/project_exception/metadata_value_not_given.rb

Constant Summary

Constants included from Muwu

GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION

Instance Method Summary collapse

Methods included from Muwu

debug, read

Constructor Details

#initialize(task, key) ⇒ MetadataValueNotGiven

Returns a new instance of MetadataValueNotGiven.



9
10
11
12
13
# File 'lib/muwu/project_exception/metadata_value_not_given.rb', line 9

def initialize(task, key)
  @task = task
  @index = task.document_index
  @key = key
end

Instance Method Details

#reportObject



16
17
18
# File 'lib/muwu/project_exception/metadata_value_not_given.rb', line 16

def report
  "Metadata value for `#{@key}` not found (document #{@index}, block `#{block_type}`)."
end

#typeObject



21
22
23
# File 'lib/muwu/project_exception/metadata_value_not_given.rb', line 21

def type
  :warning
end