Class: Browser::Navigator::MimeType
- Includes:
- Browser::NativeCachedWrapper
- Defined in:
- opal/browser/navigator.rb
Overview
Representation of a MIME type.
Instance Attribute Summary collapse
-
#description ⇒ String
readonly
The description for the MIME type.
-
#extensions ⇒ Array<String>
readonly
The extensions for this MIME type.
-
#plugin ⇒ Plugin
readonly
The plugin for the MIME type.
-
#type ⇒ String
readonly
The MIME type.
Method Summary
Methods included from Browser::NativeCachedWrapper
#restricted?, #set_native_reference
Instance Attribute Details
#description ⇒ String (readonly)
Returns the description for the MIME type.
26 |
# File 'opal/browser/navigator.rb', line 26 alias_native :description |
#extensions ⇒ Array<String> (readonly)
Returns the extensions for this MIME type.
30 31 32 |
# File 'opal/browser/navigator.rb', line 30 def extensions `#@native.suffixes`.split(/\s*/) end |
#plugin ⇒ Plugin (readonly)
Returns the plugin for the MIME type.
20 21 22 |
# File 'opal/browser/navigator.rb', line 20 def plugin Plugin.new(`#@native.enabledPlugin`) end |
#type ⇒ String (readonly)
Returns the MIME type.
36 |
# File 'opal/browser/navigator.rb', line 36 alias_native :type |