Sha256: 4c75ad3b6c34959607c5d3801f12a0eb94c8c8d01d6f0da563aa0c54819e1827
Contents?: true
Size: 373 Bytes
Versions: 1
Compression:
Stored size: 373 Bytes
Contents
# frozen_string_literal: true class <%= @index_name %> < <%= @base_class %> module Serializers class <%= @type.camelize %>Serializer def initialize(<%= @type %>, *_other) @entity = <%= @type %> end def as_json { id: @entity.id, # This field is required name: @entity.name, } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
esse-0.0.5 | lib/esse/cli/templates/serializer.rb.erb |