Top Level Namespace

Defined Under Namespace

Modules: UIC Classes: RUIC

Instance Method Summary collapse

Instance Method Details

#RUIC(opts = {}, &block) ⇒ Object

Run a series of commands inside the RUIC DSL.

If no block is supplied, this is the same as RUIC.run(opts).

Examples:

require 'ruic'
RUIC do
  uia 'test/MyProject/MyProject.uia'
  show app
  #=>UIC::Application 'MyProject.uia'>
end

Parameters:

  • opts (Hash) (defaults to: {})

    a customizable set of options

Options Hash (opts):

  • :uia (String)

    Optionally load an application before running the script.



168
169
170
171
172
173
174
175
176
# File 'lib/ruic.rb', line 168

def RUIC(opts={},&block)
	if block
		Dir.chdir(File.dirname($0)) do
			RUIC.new.tap{ |r| r.uia(opts[:uia]) if opts[:uia] }.instance_eval(&block)
		end
	else
		RUIC.run(opts)
	end
end