Sha256: 29a38361b1c98323f3d0490161756e384117010458d58edff73b6e707c8ff0b5
Contents?: true
Size: 558 Bytes
Versions: 15
Compression:
Stored size: 558 Bytes
Contents
# frozen_string_literal: true module Scim module Kit # Represents a Jbuilder template class Template TEMPLATES_DIR = Pathname.new(File.join(__dir__, 'v2/templates/')) attr_reader :target def initialize(target) @target = target end def to_json(options = {}) template.render(target, options) end private def template_path TEMPLATES_DIR.join(target.template_name) end def template @template ||= Tilt.new(template_path.to_s) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems