Class: Protocol::HTTP::Header::AcceptEncoding::Encoding
- Inherits:
-
Struct
- Object
- Struct
- Protocol::HTTP::Header::AcceptEncoding::Encoding
- Defined in:
- lib/protocol/http/header/accept_encoding.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#q ⇒ Object
Returns the value of attribute q.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
23 24 25 |
# File 'lib/protocol/http/header/accept_encoding.rb', line 23 def name @name end |
#q ⇒ Object
Returns the value of attribute q
23 24 25 |
# File 'lib/protocol/http/header/accept_encoding.rb', line 23 def q @q end |
Instance Method Details
#<=>(other) ⇒ Object
28 29 30 |
# File 'lib/protocol/http/header/accept_encoding.rb', line 28 def <=> other other.quality_factor <=> self.quality_factor end |
#quality_factor ⇒ Object
24 25 26 |
# File 'lib/protocol/http/header/accept_encoding.rb', line 24 def quality_factor (q || 1.0).to_f end |