class Muwu::ProjectException::MetadataValueNotGiven

Public Class Methods

new(task, key) click to toggle source
# 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

Public Instance Methods

report() click to toggle source
# 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
type() click to toggle source
# File lib/muwu/project_exception/metadata_value_not_given.rb, line 21
def type
  :warning
end

Private Instance Methods

block_type() click to toggle source
# File lib/muwu/project_exception/metadata_value_not_given.rb, line 30
def block_type
  case @task
  when ManifestTask::Metadata
    'metadata'
  when ManifestTask::Title
    'title'
  end
end