Class: Xenon::Headers::IfNoneMatch
- Inherits:
-
ListHeader
- Object
- Xenon::Headers::IfNoneMatch
- Defined in:
- lib/xenon/headers/if_none_match.rb
Overview
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*etags) ⇒ IfNoneMatch
constructor
A new instance of IfNoneMatch.
- #merge(other) ⇒ Object
- #to_s ⇒ Object
- #wildcard? ⇒ Boolean
Constructor Details
#initialize(*etags) ⇒ IfNoneMatch
Returns a new instance of IfNoneMatch.
10 11 12 |
# File 'lib/xenon/headers/if_none_match.rb', line 10 def initialize(*) super() end |
Class Method Details
.parse(s) ⇒ Object
20 21 22 23 |
# File 'lib/xenon/headers/if_none_match.rb', line 20 def self.parse(s) tree = Parsers::IfNoneMatchHeader.new.parse(s) Parsers::IfNoneMatchHeaderTransform.new.apply(tree) end |
.wildcard ⇒ Object
16 17 18 |
# File 'lib/xenon/headers/if_none_match.rb', line 16 def self.wildcard new end |
Instance Method Details
#merge(other) ⇒ Object
29 30 31 32 |
# File 'lib/xenon/headers/if_none_match.rb', line 29 def merge(other) raise Xenon::ProtocolError.new('Cannot merge wildcard headers') if wildcard? || other.wildcard? super end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/xenon/headers/if_none_match.rb', line 34 def to_s wildcard? ? '*' : super end |
#wildcard? ⇒ Boolean
25 26 27 |
# File 'lib/xenon/headers/if_none_match.rb', line 25 def wildcard? .empty? end |