class GdsApi::Panopticon::Registerer
def record_to_artefact(record)
def record_to_artefact(record) hash = { slug: record.slug, owning_app: owning_app, kind: kind, name: record.title, description: record.description, state: record.state } if rendering_app hash[:rendering_app] = rendering_app end optional_params = [ :need_id, :need_ids, :section, :specialist_sectors, :organisation_ids, :indexable_content, :paths, :prefixes ] optional_params.each do |attr_name| if record.respond_to? attr_name hash[attr_name] = record.public_send(attr_name) end end hash end