Parent

Included Modules

Class Index [+]

Quicksearch

Webgen::Language

Describes a human language which is uniquely identfied by a three letter code and, optionally, by an alternative three letter or a two letter code.

Attributes

codes[R]

An array containing the language codes for the language.

description[R]

The english description of the language.

Public Class Methods

new(codes, description) click to toggle source

Create a new language. codes has to be an array containing three strings: the three letter code, the alternative three letter code and the two letter code. If one is not available for the language, it has to be nil.

    # File lib/webgen/languages.rb, line 20
20:     def initialize(codes, description)
21:       @codes = codes
22:       @description = description
23:     end

Public Instance Methods

code2chars() click to toggle source

The two letter code.

    # File lib/webgen/languages.rb, line 26
26:     def code2chars
27:       @codes[2]
28:     end
code3chars() click to toggle source

The three letter code.

    # File lib/webgen/languages.rb, line 31
31:     def code3chars
32:       @codes[0]
33:     end
code3chars_alternative() click to toggle source

The alternative three letter code.

    # File lib/webgen/languages.rb, line 36
36:     def code3chars_alternative
37:       @codes[1]
38:     end
to_s() click to toggle source

The textual representation of the language.

    # File lib/webgen/languages.rb, line 41
41:     def to_s
42:       code2chars || code3chars
43:     end
Also aliased as: to_str
to_str() click to toggle source
Alias for: to_s

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.