Sha256: f0f7fc9180ba99a93a7349913150c420fdd09325e8d3bbd4cdacc0d5b1cd9748

Contents?: true

Size: 523 Bytes

Versions: 9

Compression:

Stored size: 523 Bytes

Contents

module BubbleWrap
  module App
    module_function

    # Opens an url (string or instance of `NSURL`)
    # in the default web browser
    # Usage Example:
    #   App.open_url("http://www.rubymotion.com")
    def open_url(url)
      url = NSURL.URLWithString(url) unless url.is_a?(NSURL)
      NSWorkspace.sharedWorkspace.openURL(url)
    end

    # Application Delegate
    def delegate
      shared.delegate
    end

    # the Application object.
    def shared
      NSApplication.sharedApplication
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bubble-wrap-1.9.7 motion/core/osx/app.rb
bubble-wrap-1.9.6 motion/core/osx/app.rb
bubble-wrap-1.9.5 motion/core/osx/app.rb
bubble-wrap-1.9.4 motion/core/osx/app.rb
bubble-wrap-1.9.3 motion/core/osx/app.rb
bubble-wrap-1.9.2 motion/core/osx/app.rb
bubble-wrap-1.9.1 motion/core/osx/app.rb
bubble-wrap-1.9.0 motion/core/osx/app.rb
bubble-wrap-1.8.0 motion/core/osx/app.rb