Sha256: ddfa364cc09437bb0c2700f364358a369f0d48ee316138d1286aa1ac5970eb99
Contents?: true
Size: 411 Bytes
Versions: 33
Compression:
Stored size: 411 Bytes
Contents
module Locomotive class SnippetPresenter < BasePresenter ## properties ## properties :name, :slug, :template property :updated_at, only_getter: true ## other getters / setters ## def updated_at I18n.l(self.__source.updated_at, format: :short) end ## custom as_json ## def as_json_for_html_view self.as_json(self.getters - %w(template)) end end end
Version data entries
33 entries across 33 versions & 2 rubygems