Class: Miasma::Models::Orchestration::Stack::Event

Inherits:
Types::Model show all
Includes:
Utils::Immutable
Defined in:
lib/miasma/models/orchestration/event.rb

Overview

Stack event

Instance Attribute Summary collapse

Attributes inherited from Types::Model

#api

Instance Method Summary collapse

Methods included from Utils::Immutable

#frozen_valid_state, included, #save

Methods inherited from Types::Model

#destroy, from_json, #id?, #persisted?, #reload, #save

Methods included from Utils::ApiMethoding

#api_method_for

Methods inherited from Types::Data

from_json, #from_json, #to_json

Constructor Details

#initialize(stack, args = {}) ⇒ Event



20
21
22
23
# File 'lib/miasma/models/orchestration/event.rb', line 20

def initialize(stack, args = {})
  @stack = stack
  super stack.api, args
end

Instance Attribute Details

#stackObject (readonly)

Returns the value of attribute stack.



18
19
20
# File 'lib/miasma/models/orchestration/event.rb', line 18

def stack
  @stack
end

Instance Method Details

#resourceResource



26
27
28
# File 'lib/miasma/models/orchestration/event.rb', line 26

def resource
  stack.resources.get(self.resource_id)
end