Namespace
Methods
P
T
Included Modules
Class Public methods
parser()
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/rfc4646.rb, line 24
def parser
  @@parser ||= Rfc4646::Parser
end
parser=(parser)
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/rfc4646.rb, line 28
def parser=(parser)
  @@parser = parser
end
tag(tag)

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 activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/rfc4646.rb, line 19
def tag(tag)
  matches = parser.match(tag)
  new(*matches) if matches
end
Instance Public methods
to_a()
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/rfc4646.rb, line 47
def to_a
  members.collect { |attr| self.send(attr) }
end
to_s()
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/rfc4646.rb, line 43
def to_s
  @tag ||= to_a.compact.join("-")
end
to_sym()
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/locale/tag/rfc4646.rb, line 39
def to_sym
  to_s.to_sym
end