Class: RPS::Runner
- Inherits:
-
Object
- Object
- RPS::Runner
- Defined in:
- lib/rps/runner.rb
Instance Attribute Summary collapse
-
#ui ⇒ Object
Returns the value of attribute ui.
Instance Method Summary collapse
-
#initialize(ui = nil) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(ui = nil) ⇒ Runner
Returns a new instance of Runner.
5 6 7 |
# File 'lib/rps/runner.rb', line 5 def initialize(ui = nil) @ui = ui end |
Instance Attribute Details
#ui ⇒ Object
Returns the value of attribute ui.
3 4 5 |
# File 'lib/rps/runner.rb', line 3 def ui @ui end |
Instance Method Details
#run ⇒ Object
9 10 11 12 |
# File 'lib/rps/runner.rb', line 9 def run raise "no ui provided" unless ui procs.each { |proc| ui.render proc if proc.readable? && proc.ruby? } end |