Parent

Included Modules

I18n::Locale::Tag::Rfc4646

Public Class Methods

parser() click to toggle source
    # File lib/i18n/locale/tag/rfc4646.rb, line 25
25:           def parser
26:             @@parser ||= Rfc4646::Parser
27:           end
parser=(parser) click to toggle source
    # File lib/i18n/locale/tag/rfc4646.rb, line 29
29:           def parser=(parser)
30:             @@parser = parser
31:           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 20
20:           def tag(tag)
21:             matches = parser.match(tag)
22:             new(*matches) if matches
23:           end

Public Instance Methods

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

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.