Class: Katello::Glue::Task

Inherits:
Object
  • Object
show all
Defined in:
app/lib/katello/glue/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Task



6
7
8
9
10
11
12
13
# File 'app/lib/katello/glue/task.rb', line 6

def initialize(opts)
  @name            = opts[:name]
  @status          = opts[:status]
  @priority        = opts[:priority] || 0
  @action          = opts[:action]
  @action_rollback = opts[:action_rollback]
  update_ts
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



4
5
6
# File 'app/lib/katello/glue/task.rb', line 4

def action
  @action
end

#action_rollbackObject (readonly)

Returns the value of attribute action_rollback.



4
5
6
# File 'app/lib/katello/glue/task.rb', line 4

def action_rollback
  @action_rollback
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'app/lib/katello/glue/task.rb', line 4

def name
  @name
end

#priorityObject (readonly)

Returns the value of attribute priority.



4
5
6
# File 'app/lib/katello/glue/task.rb', line 4

def priority
  @priority
end

#statusObject

Returns the value of attribute status.



4
5
6
# File 'app/lib/katello/glue/task.rb', line 4

def status
  @status
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



4
5
6
# File 'app/lib/katello/glue/task.rb', line 4

def timestamp
  @timestamp
end

Instance Method Details

#to_logObject



28
29
30
# File 'app/lib/katello/glue/task.rb', line 28

def to_log
  "#{name}[#{status}]"
end

#to_sObject



24
25
26
# File 'app/lib/katello/glue/task.rb', line 24

def to_s
  "#{name}\t #{priority}\t #{status}\t #{action}"
end