Class: Browser::Navigator::MimeType

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

Overview

Representation of a MIME type.

Instance Attribute Summary collapse

Instance Attribute Details

#descriptionString (readonly)

Returns the description for the MIME type.

Returns:

  • (String)

    the description for the MIME type



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

alias_native :description

#extensionsArray<String> (readonly)

Returns the extensions for this MIME type.

Returns:

  • (Array<String>)

    the extensions for this MIME type



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

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

#pluginPlugin (readonly)

Returns the plugin for the MIME type.

Returns:

  • (Plugin)

    the plugin for the MIME type



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

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

#typeString (readonly)

Returns the MIME type.

Returns:



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

alias_native :type