Struct.new(*RFC4646_SUBTAGS)
# File lib/i18n/locale/tag/rfc4646.rb, line 23
23: def parser
24: @@parser ||= Rfc4646::Parser
25: end
# File lib/i18n/locale/tag/rfc4646.rb, line 27
27: def parser=(parser)
28: @@parser = parser
29: 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
18: def tag(tag)
19: matches = parser.match(tag)
20: new(*matches) if matches
21: end
# File lib/i18n/locale/tag/rfc4646.rb, line 46
46: def to_a
47: members.collect { |attr| self.send(attr) }
48: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.