Class: Xenon::Headers::ContentType
- Defined in:
- lib/xenon/headers/content_type.rb
Overview
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content_type) ⇒ ContentType
constructor
A new instance of ContentType.
- #to_s ⇒ Object
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_type ⇒ Object (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_s ⇒ Object
18 19 20 |
# File 'lib/xenon/headers/content_type.rb', line 18 def to_s @content_type.to_s end |