Class: Protocol::HTTP::Header::AcceptCharset::Charset
- Inherits:
-
Struct
- Object
- Struct
- Protocol::HTTP::Header::AcceptCharset::Charset
- Defined in:
- lib/protocol/http/header/accept_charset.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
20 21 22 |
# File 'lib/protocol/http/header/accept_charset.rb', line 20 def name @name end |
#q ⇒ Object
Returns the value of attribute q
20 21 22 |
# File 'lib/protocol/http/header/accept_charset.rb', line 20 def q @q end |
Instance Method Details
#<=>(other) ⇒ Object
25 26 27 |
# File 'lib/protocol/http/header/accept_charset.rb', line 25 def <=> other other.quality_factor <=> self.quality_factor end |
#quality_factor ⇒ Object
21 22 23 |
# File 'lib/protocol/http/header/accept_charset.rb', line 21 def quality_factor (q || 1.0).to_f end |