Sha256: 29f74db8fdf27714cd32ce63a4a74358f3866ca36392e452dc942f9541e65729
Contents?: true
Size: 493 Bytes
Versions: 12
Compression:
Stored size: 493 Bytes
Contents
# frozen_string_literal: true module Scim module Kit # Implement methods necessary to generate json from jbuilder templates. module Templatable def to_json(options = {}) render(self, options) end def as_json(_options = nil) to_h end def to_h JSON.parse(to_json, symbolize_names: true).with_indifferent_access end def render(model, options) Template.new(model).to_json(options) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems