module Kubes::Compiler::Util::Normalize
Public Instance Methods
extract_type(info)
click to toggle source
info: web/service.yaml
# File lib/kubes/compiler/util/normalize.rb, line 8 def extract_type(info) info = info.sub(%r{.*/.kubes/resources/}, '') _, kind = info.split('/') kind.sub('.yaml','').sub('.yml','').sub('.rb','').sub(/-.*/,'') end
normalize_kind(path)
click to toggle source
# File lib/kubes/compiler/util/normalize.rb, line 3 def normalize_kind(path) extract_type(path).underscore.camelize # Deployment, Service, Ingress, ManagedCertificate, etc end