Sha256: d254d57d33d0b2a1a87b628016ee4205b8808d042eb3d44a52f1f244c2e78a7e
Contents?: true
Size: 589 Bytes
Versions: 33
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true module Metatron module Templates module Concerns # Makes supporting annotated resources easier module Annotated def self.included(base) # base.extend ClassMethods base.class_eval do attr_accessor :annotations initializer :annotated_initialize end end def annotated_initialize @annotations = {} end def formatted_annotations annotations && !annotations.empty? ? { annotations: } : {} end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems