class Locale::Tag::Irregular

Broken tag class.

Public Class Methods

new(tag) click to toggle source
Calls superclass method
# File lib/locale/tag/irregular.rb, line 20
def initialize(tag)
  tag = "en" if tag == nil or tag == ""
  super(tag.to_s)
  @tag = tag
end

Public Instance Methods

candidates() click to toggle source

Returns an Array of tag-candidates order by priority.

# File lib/locale/tag/irregular.rb, line 27
def candidates
  [Irregular.new(tag)]
end

Private Instance Methods

convert_to(klass) click to toggle source

Conver to the klass(the class of Language::Tag)

# File lib/locale/tag/irregular.rb, line 33
def convert_to(klass)
  klass.new(tag)
end