Class: MIME::Type::Columnar
- Inherits:
-
MIME::Type
- Object
- MIME::Type
- MIME::Type::Columnar
- Defined in:
- lib/mime/type/columnar.rb
Overview
A version of MIME::Type that works hand-in-hand with a MIME::Types::Columnar container to load data by columns.
When a field is has not yet been loaded, that data will be loaded for all types in the container before forwarding the message to MIME::Type.
More information can be found in MIME::Types::Columnar.
MIME::Type::Columnar is not intended to be created except by MIME::Types::Columnar containers.
Constant Summary
Constants inherited from MIME::Type
Instance Attribute Summary collapse
-
#friendly ⇒ Object
:nodoc:.
Attributes inherited from MIME::Type
#content_type, #extensions, #i18n_key, #media_type, #raw_media_type, #raw_sub_type, #simplified, #sub_type
Instance Method Summary collapse
-
#binary? ⇒ Boolean
:nodoc:.
-
#docs ⇒ Object
:nodoc:.
-
#encode_with(coder) ⇒ Object
:nodoc:.
-
#encoding ⇒ Object
:nodoc:.
-
#initialize(container, content_type, extensions) ⇒ Columnar
constructor
:nodoc:.
-
#obsolete? ⇒ Boolean
:nodoc:.
-
#registered? ⇒ Boolean
:nodoc:.
-
#signature? ⇒ Boolean
:nodoc:.
-
#to_a ⇒ Object
:nodoc:.
-
#to_hash ⇒ Object
:nodoc:.
-
#use_instead ⇒ Object
:nodoc:.
-
#xrefs ⇒ Object
:nodoc:.
Methods inherited from MIME::Type
#<=>, #add_extensions, #ascii?, #complete?, #default_encoding, #eql?, from_array, from_hash, from_mime_type, i18n_key, #init_with, #like?, #obsolete=, #platform?, #preferred_extension, #priority_compare, #references, #references=, #registered=, #signature=, simplified, #system, #system=, #system?, #to_h, #to_json, #to_s, #to_str, #url, #url=, #urls, #xref_urls
Constructor Details
#initialize(container, content_type, extensions) ⇒ Columnar
:nodoc:
16 17 18 19 20 |
# File 'lib/mime/type/columnar.rb', line 16 def initialize(container, content_type, extensions) # :nodoc: @container = container self.content_type = content_type self.extensions = extensions end |
Instance Attribute Details
#friendly ⇒ Object
:nodoc:
22 23 24 25 |
# File 'lib/mime/type/columnar.rb', line 22 def friendly(*) # :nodoc: @container.send(:load_friendly) unless defined?(@friendly) super if @friendly end |
Instance Method Details
#binary? ⇒ Boolean
:nodoc:
62 63 64 65 |
# File 'lib/mime/type/columnar.rb', line 62 def binary? # :nodoc: @container.send(:load_encoding) unless defined?(@encoding) super end |
#docs ⇒ Object
:nodoc:
32 33 34 35 |
# File 'lib/mime/type/columnar.rb', line 32 def docs # :nodoc: @container.send(:load_docs) unless defined?(@docs) @docs end |
#encode_with(coder) ⇒ Object
:nodoc:
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/mime/type/columnar.rb', line 79 def encode_with(coder) # :nodoc: @container.send(:load_friendly) unless defined?(@friendly) @container.send(:load_encoding) unless defined?(@encoding) @container.send(:load_docs) unless defined?(@docs) @container.send(:load_obsolete) unless defined?(@obsolete) @container.send(:load_use_instead) unless defined?(@use_instead) @container.send(:load_xrefs) unless defined?(@xrefs) @container.send(:load_registered) unless defined?(@registered) @container.send(:load_signature) unless defined?(@signature) super end |
#encoding ⇒ Object
:nodoc:
27 28 29 30 |
# File 'lib/mime/type/columnar.rb', line 27 def encoding # :nodoc: @container.send(:load_encoding) unless defined?(@encoding) @encoding end |
#obsolete? ⇒ Boolean
:nodoc:
37 38 39 40 |
# File 'lib/mime/type/columnar.rb', line 37 def obsolete? # :nodoc: @container.send(:load_obsolete) unless defined?(@obsolete) super end |
#registered? ⇒ Boolean
:nodoc:
42 43 44 45 |
# File 'lib/mime/type/columnar.rb', line 42 def registered? # :nodoc: @container.send(:load_registered) unless defined?(@registered) super end |
#signature? ⇒ Boolean
:nodoc:
47 48 49 50 |
# File 'lib/mime/type/columnar.rb', line 47 def signature? # :nodoc: @container.send(:load_signature) unless defined?(@signature) super end |
#to_a ⇒ Object
:nodoc:
67 68 69 70 71 |
# File 'lib/mime/type/columnar.rb', line 67 def to_a # :nodoc: @container.send(:load_encoding) unless defined?(@encoding) @container.send(:load_docs) unless defined?(@docs) super end |
#to_hash ⇒ Object
:nodoc:
73 74 75 76 77 |
# File 'lib/mime/type/columnar.rb', line 73 def to_hash # :nodoc: @container.send(:load_encoding) unless defined?(@encoding) @container.send(:load_docs) unless defined?(@docs) super end |
#use_instead ⇒ Object
:nodoc:
57 58 59 60 |
# File 'lib/mime/type/columnar.rb', line 57 def use_instead # :nodoc: @container.send(:load_use_instead) unless defined?(@use_instead) @use_instead end |
#xrefs ⇒ Object
:nodoc:
52 53 54 55 |
# File 'lib/mime/type/columnar.rb', line 52 def xrefs # :nodoc: @container.send(:load_xrefs) unless defined?(@xrefs) @xrefs end |