Class: Exa::Resources::MonitorRun

Inherits:
Struct
  • Object
show all
Defined in:
lib/exa/resources/monitor_run.rb

Overview

Represents a monitor run execution

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#completed_atObject

Returns the value of attribute completed_at

Returns:

  • (Object)

    the current value of completed_at



4
5
6
# File 'lib/exa/resources/monitor_run.rb', line 4

def completed_at
  @completed_at
end

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



4
5
6
# File 'lib/exa/resources/monitor_run.rb', line 4

def created_at
  @created_at
end

#failed_atObject

Returns the value of attribute failed_at

Returns:

  • (Object)

    the current value of failed_at



4
5
6
# File 'lib/exa/resources/monitor_run.rb', line 4

def failed_at
  @failed_at
end

#failed_reasonObject

Returns the value of attribute failed_reason

Returns:

  • (Object)

    the current value of failed_reason



4
5
6
# File 'lib/exa/resources/monitor_run.rb', line 4

def failed_reason
  @failed_reason
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



4
5
6
# File 'lib/exa/resources/monitor_run.rb', line 4

def id
  @id
end

#monitor_idObject

Returns the value of attribute monitor_id

Returns:

  • (Object)

    the current value of monitor_id



4
5
6
# File 'lib/exa/resources/monitor_run.rb', line 4

def monitor_id
  @monitor_id
end

#objectObject

Returns the value of attribute object

Returns:

  • (Object)

    the current value of object



4
5
6
# File 'lib/exa/resources/monitor_run.rb', line 4

def object
  @object
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



4
5
6
# File 'lib/exa/resources/monitor_run.rb', line 4

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of 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

Returns:

  • (Boolean)


29
30
31
# File 'lib/exa/resources/monitor_run.rb', line 29

def completed?
  status == "completed"
end

#failed?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/exa/resources/monitor_run.rb', line 33

def failed?
  status == "failed"
end

#freezeObject



16
17
18
19
# File 'lib/exa/resources/monitor_run.rb', line 16

def freeze
  super
  self
end

#pending?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/exa/resources/monitor_run.rb', line 21

def pending?
  status == "pending"
end

#running?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/exa/resources/monitor_run.rb', line 25

def running?
  status == "running"
end

#to_hObject



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