Class: Exa::Resources::MonitorRun
- Inherits:
-
Struct
- Object
- Struct
- Exa::Resources::MonitorRun
- Defined in:
- lib/exa/resources/monitor_run.rb
Overview
Represents a monitor run execution
Instance Attribute Summary collapse
-
#completed_at ⇒ Object
Returns the value of attribute completed_at.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#failed_at ⇒ Object
Returns the value of attribute failed_at.
-
#failed_reason ⇒ Object
Returns the value of attribute failed_reason.
-
#id ⇒ Object
Returns the value of attribute id.
-
#monitor_id ⇒ Object
Returns the value of attribute monitor_id.
-
#object ⇒ Object
Returns the value of attribute object.
-
#status ⇒ Object
Returns the value of attribute status.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #completed? ⇒ Boolean
- #failed? ⇒ Boolean
- #freeze ⇒ Object
- #pending? ⇒ Boolean
- #running? ⇒ Boolean
- #to_h ⇒ Object
Instance Attribute Details
#completed_at ⇒ Object
Returns the value of attribute completed_at
4 5 6 |
# File 'lib/exa/resources/monitor_run.rb', line 4 def completed_at @completed_at end |
#created_at ⇒ Object
Returns the value of attribute created_at
4 5 6 |
# File 'lib/exa/resources/monitor_run.rb', line 4 def created_at @created_at end |
#failed_at ⇒ Object
Returns the value of attribute failed_at
4 5 6 |
# File 'lib/exa/resources/monitor_run.rb', line 4 def failed_at @failed_at end |
#failed_reason ⇒ Object
Returns the value of attribute failed_reason
4 5 6 |
# File 'lib/exa/resources/monitor_run.rb', line 4 def failed_reason @failed_reason end |
#id ⇒ Object
Returns the value of attribute id
4 5 6 |
# File 'lib/exa/resources/monitor_run.rb', line 4 def id @id end |
#monitor_id ⇒ Object
Returns the value of attribute monitor_id
4 5 6 |
# File 'lib/exa/resources/monitor_run.rb', line 4 def monitor_id @monitor_id end |
#object ⇒ Object
Returns the value of attribute object
4 5 6 |
# File 'lib/exa/resources/monitor_run.rb', line 4 def object @object end |
#status ⇒ Object
Returns the value of attribute status
4 5 6 |
# File 'lib/exa/resources/monitor_run.rb', line 4 def status @status end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
4 5 6 |
# File 'lib/exa/resources/monitor_run.rb', line 4 def updated_at @updated_at end |
Instance Method Details
#completed? ⇒ Boolean
29 30 31 |
# File 'lib/exa/resources/monitor_run.rb', line 29 def completed? status == "completed" end |
#failed? ⇒ Boolean
33 34 35 |
# File 'lib/exa/resources/monitor_run.rb', line 33 def failed? status == "failed" end |
#freeze ⇒ Object
16 17 18 19 |
# File 'lib/exa/resources/monitor_run.rb', line 16 def freeze super self end |
#pending? ⇒ Boolean
21 22 23 |
# File 'lib/exa/resources/monitor_run.rb', line 21 def pending? status == "pending" end |
#running? ⇒ Boolean
25 26 27 |
# File 'lib/exa/resources/monitor_run.rb', line 25 def running? status == "running" end |
#to_h ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/exa/resources/monitor_run.rb', line 37 def to_h { id: id, object: object, monitor_id: monitor_id, status: status, created_at: created_at, updated_at: updated_at, completed_at: completed_at, failed_at: failed_at, failed_reason: failed_reason }.compact end |