Sha256: 7205a94dc2a67374ba7d0e22b4e447c5531bc44bb59c6a2944a9decb0f090e7f
Contents?: true
Size: 720 Bytes
Versions: 5
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true module Metatron # Base class for templating Kubernetes resources class Template attr_accessor :api_version, :label_namespace, :name attr_reader :kind def initialize(name) @name = name @label_namespace = "metatron.therubyist.org" @api_version = "v1" @kind = self.class.name.split("::").last run_initializers end alias apiVersion api_version def self.initializer(*args) @initializers ||= [] @initializers += args end def self.initializers @initializers ||= [] end private def run_initializers self.class.initializers.each { |initializer| send(initializer.to_sym) } end end end
Version data entries
5 entries across 5 versions & 1 rubygems