Class: KubeDSL::Resource
- Inherits:
-
Object
- Object
- KubeDSL::Resource
- Defined in:
- lib/kube-dsl/resource.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
T::Sig::WithoutRuntime.sig { returns(T.any(String, T::Array, T::Hash[T.untyped, T.untyped])) }.
Instance Method Summary collapse
-
#initialize(contents) ⇒ Resource
constructor
T::Sig::WithoutRuntime.sig { params(contents: T.any(String, T::Array, T::Hash[T.untyped, T.untyped])).void }.
-
#serialize ⇒ Object
T::Sig::WithoutRuntime.sig { returns(T.nilable(T.any(String, T::Array, T::Hash[T.untyped, T.untyped]))) }.
-
#to_resource ⇒ Object
T::Sig::WithoutRuntime.sig { returns(KubeDSL::Resource) }.
-
#to_yaml ⇒ Object
T::Sig::WithoutRuntime.sig { returns(String) }.
Constructor Details
Instance Attribute Details
#contents ⇒ Object (readonly)
T::Sig::WithoutRuntime.sig { returns(T.any(String, T::Array, T::Hash[T.untyped, T.untyped])) }
8 9 10 |
# File 'lib/kube-dsl/resource.rb', line 8 def contents @contents end |
Instance Method Details
#serialize ⇒ Object
T::Sig::WithoutRuntime.sig { returns(T.nilable(T.any(String, T::Array, T::Hash[T.untyped, T.untyped]))) }
16 17 18 |
# File 'lib/kube-dsl/resource.rb', line 16 def serialize cleanup(contents) end |
#to_resource ⇒ Object
T::Sig::WithoutRuntime.sig { returns(KubeDSL::Resource) }
26 27 28 |
# File 'lib/kube-dsl/resource.rb', line 26 def to_resource self end |
#to_yaml ⇒ Object
T::Sig::WithoutRuntime.sig { returns(String) }
21 22 23 |
# File 'lib/kube-dsl/resource.rb', line 21 def to_yaml YAML.dump(serialize) end |