command :open do |c| c.syntax = 'rubychina open [SESSION]' c.summary = 'Open your browser to the ruby-china to view topic' c.description = '' c.action do |args, options| say_error "Missing topic number" and abort unless @number = (Integer(args.first) rescue nil) `open http://ruby-china.org/topics/#{@number}` end end