Top Level Namespace

Defined Under Namespace

Modules: NiceBytes, Ripl, 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.



181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/ruic.rb', line 181

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