class Xenon::Headers::IfMatch

tools.ietf.org/html/rfc7232#section-3.1

Public Class Methods

new(*etags) click to toggle source
Calls superclass method
# File lib/xenon/headers/if_match.rb, line 10
def initialize(*etags)
  super(etags)
end
parse(s) click to toggle source
# File lib/xenon/headers/if_match.rb, line 20
def self.parse(s)
  tree = Parsers::IfMatchHeader.new.parse(s)
  Parsers::IfMatchHeaderTransform.new.apply(tree)
end
wildcard() click to toggle source
# File lib/xenon/headers/if_match.rb, line 16
def self.wildcard
  new
end

Public Instance Methods

merge(other) click to toggle source
Calls superclass method
# File lib/xenon/headers/if_match.rb, line 29
def merge(other)
  raise Xenon::ProtocolError.new('Cannot merge wildcard headers') if wildcard? || other.wildcard?
  super
end
to_s() click to toggle source
Calls superclass method
# File lib/xenon/headers/if_match.rb, line 34
def to_s
  wildcard? ? '*' : super
end
wildcard?() click to toggle source
# File lib/xenon/headers/if_match.rb, line 25
def wildcard?
  etags.empty?
end