class Browser::Platform

Included Modules

Defined in:

browser/platform.cr
browser/platform/adobe_air.cr
browser/platform/android.cr
browser/platform/base.cr
browser/platform/blackberry.cr
browser/platform/chrome_os.cr
browser/platform/firefox_os.cr
browser/platform/ios.cr
browser/platform/linux.cr
browser/platform/mac.cr
browser/platform/unknown.cr
browser/platform/windows.cr
browser/platform/windows_mobile.cr
browser/platform/windows_phone.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(ua : String) #

[View source]

Class Method Detail

def self.matchers #

Hold the list of platform matchers. Order is important.


[View source]

Instance Method Detail

def ==(other) #
Description copied from class Reference

Returns false (other can only be a Value here).


[View source]
def adobe_air?(expected_version = nil) #

[View source]
def android?(expected_version = nil) #

[View source]
def android_app? #

Detect if in an Android app webview (Lollipop and newer) https://developer.chrome.com/multidevice/user-agent#webview_user_agent


[View source]
def android_webview? #

[View source]
def blackberry?(expected_version = nil) #

[View source]
def chrome_os?(expected_version = nil) #

[View source]
def firefox_os? #

[View source]
def id : String #

[View source]
def ios?(expected_version = nil) #

[View source]
def ios_app? #

Detect if running on iOS app webview.


[View source]
def ios_webview? #

Detect if is iOS webview.


[View source]
def linux? #

[View source]
def mac?(expected_version = nil) #

[View source]
def name : String #

[View source]
def subject #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def ua : String #

[View source]
def unknown? #

[View source]
def version #

[View source]
def windows10? #

[View source]
def windows7? #

[View source]
def windows8? #

[View source]
def windows8_1? #

[View source]
def windows?(expected_version = nil) #

[View source]
def windows_mobile?(expected_version = nil) #

[View source]
def windows_phone?(expected_version = nil) #

[View source]
def windows_rt? #

[View source]
def windows_touchscreen_desktop? #

[View source]
def windows_vista? #

[View source]
def windows_wow64? #

[View source]
def windows_x64? #

Detect if current platform is Windows in 64-bit architecture.


[View source]
def windows_x64_inclusive? #

[View source]
def windows_xp? #

http://msdn.microsoft.com/fr-FR/library/ms537503.aspx#PltToken


[View source]