Parent

Included Modules

Class Index [+]

Quicksearch

I18n::Locale::Tag::Rfc4646

Public Class Methods

parser() click to toggle source
    # File lib/i18n/locale/tag/rfc4646.rb, line 23
23:           def parser
24:             @@parser ||= Rfc4646::Parser
25:           end
parser=(parser) click to toggle source
    # File lib/i18n/locale/tag/rfc4646.rb, line 27
27:           def parser=(parser)
28:             @@parser = parser
29:           end
tag(tag) click to toggle source

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

Public Instance Methods

to_a() click to toggle source
    # File lib/i18n/locale/tag/rfc4646.rb, line 46
46:         def to_a
47:           members.collect { |attr| self.send(attr) }
48:         end
to_s() click to toggle source
    # File lib/i18n/locale/tag/rfc4646.rb, line 42
42:         def to_s
43:           @tag ||= to_a.compact.join("-")
44:         end
to_sym() click to toggle source
    # File lib/i18n/locale/tag/rfc4646.rb, line 38
38:         def to_sym
39:           to_s.to_sym
40:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.