Class: Gitlab::Kubernetes::Helm::Parsers::ListV2
- Inherits:
-
Object
- Object
- Gitlab::Kubernetes::Helm::Parsers::ListV2
- Defined in:
- lib/gitlab/kubernetes/helm/parsers/list_v2.rb
Overview
Parses Helm v2 list (JSON) output
Constant Summary collapse
- ParserError =
Class.new(StandardError)
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
-
#initialize(contents) ⇒ ListV2
constructor
A new instance of ListV2.
- #releases ⇒ Object
Constructor Details
#initialize(contents) ⇒ ListV2
Returns a new instance of ListV2.
13 14 15 16 17 18 |
# File 'lib/gitlab/kubernetes/helm/parsers/list_v2.rb', line 13 def initialize(contents) @contents = contents @json = Gitlab::Json.parse(contents) rescue JSON::ParserError => e raise ParserError, e. end |
Instance Attribute Details
#contents ⇒ Object (readonly)
Returns the value of attribute contents
11 12 13 |
# File 'lib/gitlab/kubernetes/helm/parsers/list_v2.rb', line 11 def contents @contents end |
#json ⇒ Object (readonly)
Returns the value of attribute json
11 12 13 |
# File 'lib/gitlab/kubernetes/helm/parsers/list_v2.rb', line 11 def json @json end |
Instance Method Details
#releases ⇒ Object
20 21 22 |
# File 'lib/gitlab/kubernetes/helm/parsers/list_v2.rb', line 20 def releases @releases = helm_releases end |