Class: Kubernetes::WatchEvent
- Inherits:
-
Object
- Object
- Kubernetes::WatchEvent
- Defined in:
- lib/kubernetes/watch_event.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ WatchEvent
constructor
A new instance of WatchEvent.
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
#object ⇒ Object (readonly)
Returns the value of attribute object.
3 4 5 |
# File 'lib/kubernetes/watch_event.rb', line 3 def object @object end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/kubernetes/watch_event.rb', line 3 def type @type end |