Files
adamantium/slices/main/views/pages/show.rb
2024-02-21 21:48:44 +11:00

22 lines
434 B
Ruby

module Main
module Views
module Pages
class Show < Main::View
include Deps["repos.page_repo", renderer: "renderers.markdown"]
expose :page_content do |page|
renderer.call(content: page.content)
end
expose :page_name do |page|
page.name
end
private_expose :page do |slug:|
page_repo.fetch!(slug: slug)
end
end
end
end
end