Method: IRB::Locale#each_sublocale

Defined in:
lib/irb/locale.rb

#each_sublocale {|nil| ... } ⇒ Object

Yields:

  • (nil)


133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/irb/locale.rb', line 133

def each_sublocale
  if @lang
    if @territory
      if @encoding_name
        yield "#{@lang}_#{@territory}.#{@encoding_name}@#{@modifier}" if @modifier
        yield "#{@lang}_#{@territory}.#{@encoding_name}"
      end
      yield "#{@lang}_#{@territory}@#{@modifier}" if @modifier
      yield "#{@lang}_#{@territory}"
    end
    if @encoding_name
      yield "#{@lang}.#{@encoding_name}@#{@modifier}" if @modifier
      yield "#{@lang}.#{@encoding_name}"
    end
    yield "#{@lang}@#{@modifier}" if @modifier
    yield "#{@lang}"
  end
  yield nil
end