Sha256: 61667a2b54af3d5d01e64ac6393d8d67400922778626e16b815cf9e8490eab7d
Contents?: true
Size: 669 Bytes
Versions: 24
Compression:
Stored size: 669 Bytes
Contents
# frozen_string_literal: true module Metatron module Templates module Concerns # Makes supporting namespaced resources easier module Namespaced def self.included(base) # base.extend ClassMethods base.class_eval do attr_accessor :namespace initializer :namespaced_initialize end end def namespaced_initialize @namespace = nil end def formatted_namespace if namespace { namespace: namespace.is_a?(Namespace) ? namespace.name : namespace } else {} end end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems