Class: ISOCodes::IndividualLanguage
- Defined in:
- lib/iso_codes.rb
Instance Attribute Summary
Attributes inherited from Language
#alpha2, #alpha3_bibliographic, #alpha3_terminology, #identifier, #language_type, #reference_name
Instance Method Summary collapse
-
#initialize(individual_languages, macrolanguage, *rest) ⇒ IndividualLanguage
constructor
A new instance of IndividualLanguage.
-
#macrolanguage ⇒ Object
Returns the macrolanguage the language belongs to or
nil
if not part of any macrolanguage.
Constructor Details
#initialize(individual_languages, macrolanguage, *rest) ⇒ IndividualLanguage
Returns a new instance of IndividualLanguage.
61 62 63 64 65 66 67 |
# File 'lib/iso_codes.rb', line 61 def initialize(individual_languages, macrolanguage, *rest) super(*rest) raise ArgumentError, "individual languages given for individual language" if individual_languages @macrolanguage = macrolanguage end |
Instance Method Details
#macrolanguage ⇒ Object
Returns the macrolanguage the language belongs to or nil
if not part of any macrolanguage.
71 72 73 |
# File 'lib/iso_codes.rb', line 71 def macrolanguage ISOCodes::find_iso_639_3_language(@macrolanguage) end |