Method: Rvm2::Ui::Multi#command

Defined in:
lib/rvm2/ui/multi.rb

#command(name, &block) ⇒ Object

ui.command “message” { do_something; }



27
28
29
30
31
32
33
# File 'lib/rvm2/ui/multi.rb', line 27

def command(name, &block)
  raise "No block given" unless block_given?
  @handlers.each {|h| h.start(name) }
  status = block.call
  @handlers.each {|h| h.finish(status) }
  status
end