Class: Kubec::Status::Deployment::Item

Inherits:
Hash
  • Object
show all
Defined in:
lib/kubec/status/deployment.rb

Overview

:nodoc:

Constant Summary collapse

FIELDS =
i[name desire current up_to_date available age].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Item

Returns a new instance of Item.



15
16
17
18
19
20
21
22
# File 'lib/kubec/status/deployment.rb', line 15

def initialize(data)
  @data = data
   = data.dig('metadata')
  @spec = data.dig('spec')
  @status = data.dig('status')

  FIELDS.each { |field| send("setup_#{field}") }
end

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata.



13
14
15
# File 'lib/kubec/status/deployment.rb', line 13

def 
  
end

#specObject (readonly)

Returns the value of attribute spec.



13
14
15
# File 'lib/kubec/status/deployment.rb', line 13

def spec
  @spec
end

#statusObject (readonly)

Returns the value of attribute status.



13
14
15
# File 'lib/kubec/status/deployment.rb', line 13

def status
  @status
end