class Configurious::CLI
Public Instance Methods
run()
click to toggle source
include whatever modules you need
# File lib/configurious.rb, line 28 def run program :name, 'configurious' program :version, Configurious::VERSION program :description, 'Allows scripting of changes to yaml files' command :poop do |c| c.syntax = "configurious poop" c.summary = "It's poopy" c.action do |args, options| puts "I have #{args.inspect}" end end command :apply do |c| c.syntax = 'configurious apply [options]' c.summary = '' c.description = '' c.example 'description', 'command example' c.action do |args, options| tfile, ifile = args result = Configurious.apply(ifile,File.read(tfile)) puts result end end run! end