Class: Xenon::Headers::ContentType

Inherits:
Header
  • Object
show all
Defined in:
lib/xenon/headers/content_type.rb

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content_type) ⇒ ContentType

Returns a new instance of ContentType.



10
11
12
# File 'lib/xenon/headers/content_type.rb', line 10

def initialize(content_type)
  @content_type = content_type
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



8
9
10
# File 'lib/xenon/headers/content_type.rb', line 8

def content_type
  @content_type
end

Class Method Details

.parse(s) ⇒ Object



14
15
16
# File 'lib/xenon/headers/content_type.rb', line 14

def self.parse(s)
  new(Xenon::ContentType.parse(s))
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/xenon/headers/content_type.rb', line 18

def to_s
  @content_type.to_s
end