class Object

Public Instance Methods

RUIC(opts={},&block) click to toggle source

Run a series of commands inside the RUIC DSL.

@example

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

If no block is supplied, this is the same as {RUIC.run RUIC.run(opts)}. @option opts [String] :uia Optionally load an application before running the script.

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