module Nuntius::Concerns::MetadataScoped

def add_metadata

def add_metadata
  self.metadata ||= {}
  unless Nuntius.config.metadata_fields.empty?
    Nuntius.config.metadata_fields.each do |field, data|
      if data[:current]
        current = data[:current]
        self.metadata[field.to_s] ||= instance_exec(&current)
      end
    end
  end
  instance_exec(&Nuntius.config.add_metadata)
end