Struct.new(*RFC4646_SUBTAGS)
# File lib/i18n/locale/tag/rfc4646.rb, line 23 def parser @@parser ||= Rfc4646::Parser end
# File lib/i18n/locale/tag/rfc4646.rb, line 27 def parser=(parser) @@parser = parser end
Parses the given tag and returns a Tag instance if it is valid. Returns false if the given tag is not valid according to RFC 4646.
# File lib/i18n/locale/tag/rfc4646.rb, line 18 def tag(tag) matches = parser.match(tag) new(*matches) if matches end
Generated with the Darkfish Rdoc Generator 2.