Skip to content

Instantly share code, notes, and snippets.

@joelmccracken
Created September 21, 2011 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelmccracken/1231058 to your computer and use it in GitHub Desktop.
Save joelmccracken/1231058 to your computer and use it in GitHub Desktop.
macirb
macirb
irb(main):001:0> framework 'Foundation'
framework 'ScriptingBridge'
framework 'Foundation'
=> true
irb(main):002:0> framework 'ScriptingBridge'
=> true
irb(main):003:0> firefox = SBApplication.applicationWithBundleIdentifier("org.mozilla.firefox")
firefox = SBApplication.applicationWithBundleIdentifier("org.mozilla.firefox")
=> #<FirefoxApplication:0x20047dea0>
irb(main):004:0>
=> nil
irb(main):005:0> firefox
firefox
=> #<FirefoxApplication:0x20047dea0>
irb(main):006:0> load_bridge_support_file "Firefox.bridgesupport"
load_bridge_support_file "Firefox.bridgesupport"
=> main
irb(main):007:0> firefox.windows
firefox.windows
=> [#<FirefoxWindow:0x20049a3a0>, #<FirefoxWindow:0x20049a400>, #<FirefoxWindow:0x20046a4a0>, #<FirefoxWindow:0x200457b80>, #<FirefoxWindow:0x2004a7e40>, #<FirefoxWindow:0x200498180>, #<FirefoxWindow:0x200468380>, #<FirefoxWindow:0x200448520>, #<FirefoxWindow:0x200468980>, #<FirefoxWindow:0x200468ac0>, #<FirefoxWindow:0x2004c8dc0>, #<FirefoxWindow:0x2004c94c0>]
irb(main):008:0> firefox.methods
firefox.methods
=> [:clear_history!, :h!, :history!, :h, :history, :to_plist, :Complex, :Rational, :enum_for, :to_enum, :object_id, :__id__, :define_singleton_method, :public_method, :method, :extend, :respond_to_missing?, :respond_to?, :public_send, :send, :__send__, :instance_exec, :instance_eval, :__callee__, :__method__, :tap, :is_a?, :kind_of?, :instance_of?, :instance_variable_defined?, :instance_variable_set, :instance_variable_get, :instance_variables, :public_methods, :private_methods, :protected_methods, :singleton_methods, :methods, :inspect, :to_s, :untrusted?, :untrust, :trust, :frozen?, :freeze, :untaint, :tainted?, :taint, :__type__, :dup, :clone, :<=>, :eql?, :!~, :=~, :===, :nil?, :!=, :!, :==, :equal?]
irb(main):009:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment