Class: Exa::Resources::Monitor
- Inherits:
-
Struct
- Object
- Struct
- Exa::Resources::Monitor
- Defined in:
- lib/exa/resources/monitor.rb
Overview
Represents a webset monitor that automates updates on a schedule
Instance Attribute Summary collapse
-
#behavior ⇒ Object
Returns the value of attribute behavior.
-
#cadence ⇒ Object
Returns the value of attribute cadence.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute 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.
-
#webset_id ⇒ Object
Returns the value of attribute webset_id.
Instance Method Summary collapse
Instance Attribute Details
#behavior ⇒ Object
Returns the value of attribute behavior
4 5 6 |
# File 'lib/exa/resources/monitor.rb', line 4 def behavior @behavior end |
#cadence ⇒ Object
Returns the value of attribute cadence
4 5 6 |
# File 'lib/exa/resources/monitor.rb', line 4 def cadence @cadence end |
#created_at ⇒ Object
Returns the value of attribute created_at
4 5 6 |
# File 'lib/exa/resources/monitor.rb', line 4 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id
4 5 6 |
# File 'lib/exa/resources/monitor.rb', line 4 def id @id end |
#object ⇒ Object
Returns the value of attribute object
4 5 6 |
# File 'lib/exa/resources/monitor.rb', line 4 def object @object end |
#status ⇒ Object
Returns the value of attribute status
4 5 6 |
# File 'lib/exa/resources/monitor.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.rb', line 4 def updated_at @updated_at end |
#webset_id ⇒ Object
Returns the value of attribute webset_id
4 5 6 |
# File 'lib/exa/resources/monitor.rb', line 4 def webset_id @webset_id end |
Instance Method Details
#active? ⇒ Boolean
26 27 28 |
# File 'lib/exa/resources/monitor.rb', line 26 def active? status == "active" end |
#freeze ⇒ Object
15 16 17 18 19 20 |
# File 'lib/exa/resources/monitor.rb', line 15 def freeze super cadence.freeze if cadence behavior.freeze if behavior self end |
#paused? ⇒ Boolean
30 31 32 |
# File 'lib/exa/resources/monitor.rb', line 30 def paused? status == "paused" end |
#pending? ⇒ Boolean
22 23 24 |
# File 'lib/exa/resources/monitor.rb', line 22 def pending? status == "pending" end |
#to_h ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/exa/resources/monitor.rb', line 34 def to_h { id: id, object: object, status: status, webset_id: webset_id, cadence: cadence, behavior: behavior, created_at: created_at, updated_at: updated_at }.compact end |