class Ua::Util::AppHelper
Public Class Methods
new(app = Ua::Application.top_app)
click to toggle source
# File lib/ua/util.rb, line 51 def initialize(app = Ua::Application.top_app) @app = app end
Public Instance Methods
define_command(name, id, *names, &bl)
click to toggle source
# File lib/ua/util.rb, line 57 def define_command(name, id, *names, &bl) bl ||= lambda{|a| a} uaobject = Helper.new @app.get id (class << self; self; end).send :define_method, name do |*args| uaobject[*names] = args bl.call(context(uaobject, :app)) end end
pop()
click to toggle source
# File lib/ua/util.rb, line 65 def pop Ua::Application.pop_app if Ua::Application.top_app == @app end
push()
click to toggle source
# File lib/ua/util.rb, line 54 def push Ua::Application.push_app @app end