Class: Katello::Glue::Task
- Inherits:
-
Object
- Object
- Katello::Glue::Task
- Defined in:
- app/lib/katello/glue/task.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#action_rollback ⇒ Object
readonly
Returns the value of attribute action_rollback.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
-
#status ⇒ Object
Returns the value of attribute status.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Task
constructor
A new instance of Task.
- #to_log ⇒ Object
- #to_s ⇒ Object
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
#action ⇒ Object (readonly)
Returns the value of attribute action.
4 5 6 |
# File 'app/lib/katello/glue/task.rb', line 4 def action @action end |
#action_rollback ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'app/lib/katello/glue/task.rb', line 4 def name @name end |
#priority ⇒ Object (readonly)
Returns the value of attribute priority.
4 5 6 |
# File 'app/lib/katello/glue/task.rb', line 4 def priority @priority end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'app/lib/katello/glue/task.rb', line 4 def status @status end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
4 5 6 |
# File 'app/lib/katello/glue/task.rb', line 4 def end |
Instance Method Details
#to_log ⇒ Object
28 29 30 |
# File 'app/lib/katello/glue/task.rb', line 28 def to_log "#{name}[#{status}]" end |
#to_s ⇒ Object
24 25 26 |
# File 'app/lib/katello/glue/task.rb', line 24 def to_s "#{name}\t #{priority}\t #{status}\t #{action}" end |