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.



34
35
36
37
38
39
40
41
# File 'lib/iso_codes.rb', line 34

def initialize(identifier, part2b, part2t, part1, language_type, ref_name)
  @identifier = identifier
  @alpha3_bibliographic = part2b == '' ? nil : part2b
  @alpha3_terminology = part2t == '' ? nil : part2t
  @alpha2 = part1 == '' ? nil : 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.



23
24
25
# File 'lib/iso_codes.rb', line 23

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.



16
17
18
# File 'lib/iso_codes.rb', line 16

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.



20
21
22
# File 'lib/iso_codes.rb', line 20

def alpha3_terminology
  @alpha3_terminology
end

#identifierObject (readonly)

ISO 639-3 identifier for the language, or nil if none is defined.



12
13
14
# File 'lib/iso_codes.rb', line 12

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.



29
30
31
# File 'lib/iso_codes.rb', line 29

def language_type
  @language_type
end

#reference_nameObject (readonly)

Reference name for the language.



32
33
34
# File 'lib/iso_codes.rb', line 32

def reference_name
  @reference_name
end