Class: Kubec::Status::Service::Item

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

Overview

:nodoc:

Constant Summary collapse

FIELDS =
i[name cluster_ip ports selector].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
# File 'lib/kubec/status/service.rb', line 15

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

  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/service.rb', line 13

def 
  
end

#specObject (readonly)

Returns the value of attribute spec.



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

def spec
  @spec
end