lib/accept_headers/language.rb in accept_headers-0.0.3 vs lib/accept_headers/language.rb in accept_headers-0.0.4
- old
+ new
@@ -47,10 +47,14 @@
}
end
def to_s
qvalue = (q == 0 || q == 1) ? q.to_i : q
- "#{primary_tag}-#{subtag};q=#{qvalue}"
+ "#{language_tag};q=#{qvalue}"
+ end
+
+ def language_tag
+ "#{primary_tag}-#{subtag}"
end
def match(other)
if primary_tag == other.primary_tag && subtag == other.subtag
true