Class: Kuby::SetupTaskList
- Inherits:
-
Object
- Object
- Kuby::SetupTaskList
- Extended by:
- T::Sig
- Defined in:
- lib/kuby/dev_setup.rb
Instance Attribute Summary collapse
-
#clis ⇒ Object
readonly
Returns the value of attribute clis.
-
#tasks ⇒ Object
readonly
Returns the value of attribute tasks.
Instance Method Summary collapse
-
#initialize(tasks, clis) ⇒ SetupTaskList
constructor
A new instance of SetupTaskList.
- #run ⇒ Object
Constructor Details
#initialize(tasks, clis) ⇒ SetupTaskList
Returns a new instance of SetupTaskList.
205 206 207 208 |
# File 'lib/kuby/dev_setup.rb', line 205 def initialize(tasks, clis) @tasks = tasks @clis = clis end |
Instance Attribute Details
#clis ⇒ Object (readonly)
Returns the value of attribute clis.
202 203 204 |
# File 'lib/kuby/dev_setup.rb', line 202 def clis @clis end |
#tasks ⇒ Object (readonly)
Returns the value of attribute tasks.
199 200 201 |
# File 'lib/kuby/dev_setup.rb', line 199 def tasks @tasks end |
Instance Method Details
#run ⇒ Object
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/kuby/dev_setup.rb', line 211 def run tasks.each do |task| pipes = Pipes.build(clis) Spinner.spin(task.) do |spinner| pipes.wrap { task.run } if pipes.success? spinner.success else spinner.failure print_error(pipes.ex) pipes.each do |pipe| print_streams(pipe) end return false end end end true end |