Class: Scim::Kit::Template
- Inherits:
-
Object
- Object
- Scim::Kit::Template
- Defined in:
- lib/scim/kit/template.rb
Overview
Represents a Jbuilder template
Constant Summary collapse
- TEMPLATES_DIR =
Pathname.new(File.join(__dir__, 'v2/templates/'))
Instance Attribute Summary collapse
- #target ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(target) ⇒ Template
constructor
A new instance of Template.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(target) ⇒ Template
Returns a new instance of Template.
11 12 13 |
# File 'lib/scim/kit/template.rb', line 11 def initialize(target) @target = target end |
Instance Attribute Details
#target ⇒ Object (readonly)
9 10 11 |
# File 'lib/scim/kit/template.rb', line 9 def target @target end |
Instance Method Details
#to_json(options = {}) ⇒ Object
15 16 17 |
# File 'lib/scim/kit/template.rb', line 15 def to_json( = {}) template.render(target, ) end |