Class: Browser::Navigator::MimeType

Inherits:
Object
  • Object
show all
Includes:
Browser::NativeCachedWrapper
Defined in:
opal/browser/navigator.rb

Overview

Representation of a MIME type.

Instance Attribute Summary collapse

Method Summary

Methods included from Browser::NativeCachedWrapper

#restricted?, #set_native_reference

Instance Attribute Details

#descriptionString (readonly)

Returns the description for the MIME type.

Returns:

  • (String)

    the description for the MIME type



26
# File 'opal/browser/navigator.rb', line 26

alias_native :description

#extensionsArray<String> (readonly)

Returns the extensions for this MIME type.

Returns:

  • (Array<String>)

    the extensions for this MIME type



30
31
32
# File 'opal/browser/navigator.rb', line 30

def extensions
  `#@native.suffixes`.split(/\s*/)
end

#pluginPlugin (readonly)

Returns the plugin for the MIME type.

Returns:

  • (Plugin)

    the plugin for the MIME type



20
21
22
# File 'opal/browser/navigator.rb', line 20

def plugin
  Plugin.new(`#@native.enabledPlugin`)
end

#typeString (readonly)

Returns the MIME type.

Returns:



36
# File 'opal/browser/navigator.rb', line 36

alias_native :type