Class: Retab::ErrorTerminal

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/workflow_runs/error_terminal.rb

Constant Summary collapse

HASH_ATTRS =
{
  status: :status,
  message: :message,
  stage: :stage,
  category: :category,
  details: :details,
  failing_step_id: :failing_step_id
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ ErrorTerminal

Returns a new instance of ErrorTerminal.



25
26
27
28
29
30
31
32
33
# File 'lib/retab/workflow_runs/error_terminal.rb', line 25

def initialize(json)
  hash = self.class.normalize(json)
  @status = hash[:status]
  @message = hash[:message]
  @stage = hash[:stage]
  @category = hash[:category]
  @details = hash[:details] ? Retab::ErrorDetails.new(hash[:details]) : nil
  @failing_step_id = hash[:failing_step_id]
end

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



17
18
19
# File 'lib/retab/workflow_runs/error_terminal.rb', line 17

def category
  @category
end

#detailsObject

Returns the value of attribute details.



17
18
19
# File 'lib/retab/workflow_runs/error_terminal.rb', line 17

def details
  @details
end

#failing_step_idObject

Returns the value of attribute failing_step_id.



17
18
19
# File 'lib/retab/workflow_runs/error_terminal.rb', line 17

def failing_step_id
  @failing_step_id
end

#messageObject

Returns the value of attribute message.



17
18
19
# File 'lib/retab/workflow_runs/error_terminal.rb', line 17

def message
  @message
end

#stageObject

Returns the value of attribute stage.



17
18
19
# File 'lib/retab/workflow_runs/error_terminal.rb', line 17

def stage
  @stage
end

#statusObject

Returns the value of attribute status.



17
18
19
# File 'lib/retab/workflow_runs/error_terminal.rb', line 17

def status
  @status
end