Class: RemoteRun::Configuration::TaskManager
- Inherits:
-
Object
- Object
- RemoteRun::Configuration::TaskManager
- Defined in:
- lib/remote_run/configuration.rb
Instance Attribute Summary collapse
-
#tasks ⇒ Object
readonly
Returns the value of attribute tasks.
Instance Method Summary collapse
- #add(task) ⇒ Object
- #count ⇒ Object
- #find_task ⇒ Object
- #has_more_tasks? ⇒ Boolean
-
#initialize ⇒ TaskManager
constructor
A new instance of TaskManager.
Constructor Details
#initialize ⇒ TaskManager
Returns a new instance of TaskManager.
89 90 91 |
# File 'lib/remote_run/configuration.rb', line 89 def initialize @tasks = [] end |
Instance Attribute Details
#tasks ⇒ Object (readonly)
Returns the value of attribute tasks.
87 88 89 |
# File 'lib/remote_run/configuration.rb', line 87 def tasks @tasks end |
Instance Method Details
#add(task) ⇒ Object
93 94 95 |
# File 'lib/remote_run/configuration.rb', line 93 def add(task) @tasks.push(task) end |
#count ⇒ Object
101 102 103 |
# File 'lib/remote_run/configuration.rb', line 101 def count @tasks.length end |
#find_task ⇒ Object
97 98 99 |
# File 'lib/remote_run/configuration.rb', line 97 def find_task @tasks.shift end |
#has_more_tasks? ⇒ Boolean
105 106 107 |
# File 'lib/remote_run/configuration.rb', line 105 def has_more_tasks? @tasks.size > 0 end |