Module: Appscript

Defined in:
lib/rb-scpt.rb,
lib/version.rb

Defined Under Namespace

Modules: AppDataAccessors Classes: AppData, Application, CommandError, GenericApplication, GenericReference, Reference

Constant Summary collapse

AS_App =
Appscript::GenericApplication.new(Application)
AS_Con =
Appscript::GenericReference.new(['con'])
AS_Its =
Appscript::GenericReference.new(['its'])
ApplicationNotFoundError =
FindApp::ApplicationNotFoundError
CantLaunchApplicationError =
Connect::CantLaunchApplicationError
Version =
"1.0.4"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.app(*args) ⇒ Object

REFERENCE ROOTS

public (note: Application & GenericApplication classes may also be accessed if subclassing Application class is required)



970
971
972
973
974
975
976
# File 'lib/rb-scpt.rb', line 970

def Appscript.app(*args)
  if args == []
    return AS_App
  else
    return AS_App.by_name(*args)
  end
end

.conObject



978
979
980
# File 'lib/rb-scpt.rb', line 978

def Appscript.con
  return AS_Con
end

.itsObject



982
983
984
# File 'lib/rb-scpt.rb', line 982

def Appscript.its
  return AS_Its
end

Instance Method Details

#app(*args) ⇒ Object

also define app, con, its as instance methods so that clients can ‘include Appscript’



988
989
990
991
992
993
994
# File 'lib/rb-scpt.rb', line 988

def app(*args)
  if args == []
    return AS_App
  else
    return AS_App.by_name(*args)
  end
end

#conObject



996
997
998
# File 'lib/rb-scpt.rb', line 996

def con
  return AS_Con
end

#itsObject



1000
1001
1002
# File 'lib/rb-scpt.rb', line 1000

def its
  return AS_Its
end