Sha256: dcd23ec71ae5d63a7af30c63a201163be941000dd27cc51659a334277eb9171b

Contents?: true

Size: 953 Bytes

Versions: 20

Compression:

Stored size: 953 Bytes

Contents

RCoLi
=====

Library for development of command line applications in Ruby.

== Installation

  $ gem install rcoli
	
== Example

		#!/usr/bin/env ruby

		require 'rcoli'

		application("mytool") do
		  author "Operations Team"
		  version "1.0.0"
		  description "Tool for management of infrastructure"
  
		  flag short: 'd', long: 'debug' do |f|
		    f.description "Turn on debugging"
		  end
			
		  switch short: 'c', long: 'config' do |s|
		    s.description "Path of file with configuration"
		  end
  
		  command :node do |c|
		    c.description "Commands for creating and managing nodes"
		    c.command :create do |sc|
		      sc.description "Creates node"
		      sc.action do |global_opts, opts, args|
					 # your action here
		      end
		    end
				
		    c.command :remove do |sc|
		      sc.description "Remove node"
		      sc.action do |global_opts, opts, args|
					 # your action here
		      end
		    end
				
		  end
		end	
	
	

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rcoli-0.6.8 README.md
rcoli-0.6.7 README.md
rcoli-0.6.6 README.md
rcoli-0.6.5 README.md
rcoli-0.6.4 README.md
rcoli-0.6.3 README.md
rcoli-0.6.2 README.md
rcoli-0.6.1 README.md
rcoli-0.6.0 README.md
rcoli-0.5.12 README.md
rcoli-0.5.11 README.md
rcoli-0.5.10 README.md
rcoli-0.5.9 README.md
rcoli-0.5.8 README.md
rcoli-0.5.7 README.md
rcoli-0.5.6 README.md
rcoli-0.5.5 README.md
rcoli-0.5.4 README.md
rcoli-0.5.3 README.md
rcoli-0.5.2 README.md