Sha256: 6dbd79dfd6bb443d4eff5e0b36e4861c6c1ef08acfc7357a972354ce48b53fc1
Contents?: true
Size: 580 Bytes
Versions: 58
Compression:
Stored size: 580 Bytes
Contents
module Kubes::Args class Custom extend Memoist include Dsl include DslEvaluator attr_accessor :name def initialize(name, file) @name = name.to_s @file = file # IE: .kubes/config/kubectl/args.rb @commands = {} end def build return @commands unless File.exist?(@file) evaluate_file(@file) @commands.deep_stringify_keys! end memoize :build def args args = dig("args") args.compact.flatten end def dig(prop, default=[]) @commands.dig(@name, prop) || default end end end
Version data entries
58 entries across 58 versions & 1 rubygems