Skip to content

Instantly share code, notes, and snippets.

@khalilovcmd
Created February 5, 2018 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khalilovcmd/ad9cad1ac86c432298c5f710cb59fc5f to your computer and use it in GitHub Desktop.
Save khalilovcmd/ad9cad1ac86c432298c5f710cb59fc5f to your computer and use it in GitHub Desktop.
class PartRenderer < Renderer
PART_MAPPING = {
"note" => ::Services::Slack::Rendering::Parts::Note,
....
....
....
}
def render(context)
PART_MAPPING[part_type].new(context).render
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment