Sha256: cd6a89d362ef6528280736404e719fff674ef8f08a83ee0468a43468ce6016b2

Contents?: true

Size: 337 Bytes

Versions: 1

Compression:

Stored size: 337 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubychina-0.0.1 ./lib/rubychina/commands/open.rb