Class: Kubernetes::WatchEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/kubernetes/watch_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ WatchEvent



5
6
7
8
# File 'lib/kubernetes/watch_event.rb', line 5

def initialize(data)
  @type = data.fetch("type")
  @object = map_object(data.fetch("object"))
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



3
4
5
# File 'lib/kubernetes/watch_event.rb', line 3

def object
  @object
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/kubernetes/watch_event.rb', line 3

def type
  @type
end