Introducing the app-mgr gem

require 'app-mgr'

app = AppMgr.new

class Fun_handler
  def initialize(opt={})
    opt[:variables][:evening] = true    
  end

  def call_level8(params='')
    '<result>we are here</result>'
  end
end

app.load 'fun', Fun_handler
#=> "'fun' loaded"

app.run 'fun'
#=> "'fun' running ..."

app.execute 'fun', 'level8',''
#=> ["<result>we are here</result>", "text/xml"]

puts app.connect('fun') {|h| h.inspect}
{:evening=>true}

app.connect('fun') do |h|
  h[:start] = Time.now
end

puts app.connect('fun') {|h| h.inspect}
#=> {:evening=>true, :start=>2010-08-02 18:49:40 +0100}

The app-mgr gem is used to load, run, and execute ProjectX applications.

Tags:
Source:
2151hrs.txt
Published:
27-03-2014 21:51