class Scim::Kit::Template

Represents a Jbuilder template

Constants

TEMPLATES_DIR

Attributes

target[R]

Public Class Methods

new(target) click to toggle source
# File lib/scim/kit/template.rb, line 11
def initialize(target)
  @target = target
end

Public Instance Methods

to_json(options = {}) click to toggle source
# File lib/scim/kit/template.rb, line 15
def to_json(options = {})
  template.render(target, options)
end

Private Instance Methods

template() click to toggle source
# File lib/scim/kit/template.rb, line 25
def template
  @template ||= Tilt.new(template_path.to_s)
end
template_path() click to toggle source
# File lib/scim/kit/template.rb, line 21
def template_path
  TEMPLATES_DIR.join(target.template_name)
end