Class: RPS::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/rps/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#uiObject

Returns the value of attribute ui.



3
4
5
# File 'lib/rps/runner.rb', line 3

def ui
  @ui
end

Instance Method Details

#runObject



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