Class: ISOCodes::Language
- Inherits:
-
Object
- Object
- ISOCodes::Language
- Defined in:
- lib/iso_codes.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#alpha2 ⇒ Object
readonly
ISO 639-1 identifier for the language, or
nil
if none is defined. -
#alpha3_bibliographic ⇒ Object
readonly
ISO 639-2 identifier of the bibliographic applications code set for the language, or
nil
if none is defined. -
#alpha3_terminology ⇒ Object
readonly
ISO 639-2 identifier of the terminology applications code set for the language, or
nil
if none is defined. -
#identifier ⇒ Object
readonly
ISO 639-3 identifier for the language, or
nil
if none is defined. -
#language_type ⇒ Object
readonly
Language type for the language.
-
#reference_name ⇒ Object
readonly
Reference name for the language.
Instance Method Summary collapse
-
#initialize(identifier, part2b, part2t, part1, language_type, ref_name) ⇒ Language
constructor
A new instance of Language.
Constructor Details
#initialize(identifier, part2b, part2t, part1, language_type, ref_name) ⇒ Language
Returns a new instance of Language.
41 42 43 44 45 46 47 48 |
# File 'lib/iso_codes.rb', line 41 def initialize(identifier, part2b, part2t, part1, language_type, ref_name) @identifier = identifier @alpha3_bibliographic = part2b @alpha3_terminology = part2t @alpha2 = part1 @language_type = language_type @reference_name = ref_name end |
Instance Attribute Details
#alpha2 ⇒ Object (readonly)
ISO 639-1 identifier for the language, or nil
if none is defined.
30 31 32 |
# File 'lib/iso_codes.rb', line 30 def alpha2 @alpha2 end |
#alpha3_bibliographic ⇒ Object (readonly)
ISO 639-2 identifier of the bibliographic applications code set for the language, or nil
if none is defined.
23 24 25 |
# File 'lib/iso_codes.rb', line 23 def alpha3_bibliographic @alpha3_bibliographic end |
#alpha3_terminology ⇒ Object (readonly)
ISO 639-2 identifier of the terminology applications code set for the language, or nil
if none is defined.
27 28 29 |
# File 'lib/iso_codes.rb', line 27 def alpha3_terminology @alpha3_terminology end |
#identifier ⇒ Object (readonly)
ISO 639-3 identifier for the language, or nil
if none is defined.
19 20 21 |
# File 'lib/iso_codes.rb', line 19 def identifier @identifier end |
#language_type ⇒ Object (readonly)
Language type for the language. Language type is either :living
, :extinct
, :ancient
, :historic
, :constructed
, or :special
. See www.sil.org/iso639-3/types.asp for a description.
36 37 38 |
# File 'lib/iso_codes.rb', line 36 def language_type @language_type end |
#reference_name ⇒ Object (readonly)
Reference name for the language.
39 40 41 |
# File 'lib/iso_codes.rb', line 39 def reference_name @reference_name end |