Class: MimeTable::MimeType

Inherits:
Object
  • Object
show all
Defined in:
lib/mime_table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ MimeType

Returns a new instance of MimeType.



26
27
28
29
# File 'lib/mime_table.rb', line 26

def initialize(options)
  @content_type = options[:content_type]
  @extension = options[:extension]
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



24
25
26
# File 'lib/mime_table.rb', line 24

def content_type
  @content_type
end

#extensionObject (readonly)

Returns the value of attribute extension.



24
25
26
# File 'lib/mime_table.rb', line 24

def extension
  @extension
end

Instance Method Details

#to_sObject



31
32
33
# File 'lib/mime_table.rb', line 31

def to_s
  @content_type.to_s
end