# frozen_string_literal: true


module WikiPageRepr
  BASE = { methods: [:title, :deprecated_at] }.freeze

  module_function

  def base wiki_page
    wiki_page.as_json(BASE)
  end

  def many wiki_pages
    wiki_pages.map { |p| base(p) }
  end
end
