Class: ScatterGather::DependencyStatus

Inherits:
Struct
  • Object
show all
Defined in:
lib/scatter_gather/dependency_status.rb

Overview

Struct to represent the status of a dependency job

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#active_job_classObject

Returns the value of attribute active_job_class

Returns:

  • (Object)

    the current value of active_job_class



7
8
9
# File 'lib/scatter_gather/dependency_status.rb', line 7

def active_job_class
  @active_job_class
end

#active_job_idObject

Returns the value of attribute active_job_id

Returns:

  • (Object)

    the current value of active_job_id



7
8
9
# File 'lib/scatter_gather/dependency_status.rb', line 7

def active_job_id
  @active_job_id
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



7
8
9
# File 'lib/scatter_gather/dependency_status.rb', line 7

def status
  @status
end

Instance Method Details

#checkmarkString

Get a checkmark for completed jobs

Returns:

  • (String)

    "✓" for completed jobs, " " for others



16
17
18
# File 'lib/scatter_gather/dependency_status.rb', line 16

def checkmark
  (status == :completed) ? "✓" : " "
end

#display_classString

Get a display-friendly class name for unknown jobs

Returns:

  • (String)

    The class name or "(unknown)" for unknown jobs



10
11
12
# File 'lib/scatter_gather/dependency_status.rb', line 10

def display_class
  active_job_class || "(unknown)"
end