Class: ISOCodes::Language

Inherits:
Object
  • Object
show all
Defined in:
lib/iso_codes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#alpha2Object (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_bibliographicObject (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_terminologyObject (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

#identifierObject (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_typeObject (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_nameObject (readonly)

Reference name for the language.



39
40
41
# File 'lib/iso_codes.rb', line 39

def reference_name
  @reference_name
end