Class: Xenon::Headers::ContentLength
- Defined in:
- lib/xenon/headers/content_length.rb
Overview
Instance Attribute Summary collapse
-
#content_length ⇒ Object
readonly
Returns the value of attribute content_length.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content_length) ⇒ ContentLength
constructor
A new instance of ContentLength.
- #to_s ⇒ Object
Constructor Details
#initialize(content_length) ⇒ ContentLength
Returns a new instance of ContentLength.
10 11 12 |
# File 'lib/xenon/headers/content_length.rb', line 10 def initialize(content_length) @content_length = content_length end |
Instance Attribute Details
#content_length ⇒ Object (readonly)
Returns the value of attribute content_length.
8 9 10 |
# File 'lib/xenon/headers/content_length.rb', line 8 def content_length @content_length end |
Class Method Details
.parse(s) ⇒ Object
14 15 16 |
# File 'lib/xenon/headers/content_length.rb', line 14 def self.parse(s) Integer(s) end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/xenon/headers/content_length.rb', line 18 def to_s @content_length.to_s end |