discourse/lib/onebox/view.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
355 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require_relative "template_support"
module Onebox
class View < Mustache
include TemplateSupport
attr_reader :record
def initialize(name, record)
@record = record
self.template_name = name
self.template_path = load_paths.last
end
def to_html
render(record)
end
end
end