Class: DS::Extractor::Language
- Defined in:
- lib/ds/extractor/language.rb
Instance Attribute Summary collapse
-
#codes ⇒ Object
Returns the value of attribute codes.
Attributes inherited from BaseTerm
Instance Method Summary collapse
-
#initialize(as_recorded:, codes: Set.new) ⇒ Language
constructor
Initializes the Language object with the provided as_recorded and codes.
- #to_a ⇒ Object
- #to_h ⇒ Object
Methods inherited from BaseTerm
Constructor Details
#initialize(as_recorded:, codes: Set.new) ⇒ Language
Initializes the Language object with the provided as_recorded and codes.
13 14 15 16 |
# File 'lib/ds/extractor/language.rb', line 13 def initialize as_recorded:, codes: Set.new @codes = codes super(as_recorded: as_recorded) end |
Instance Attribute Details
#codes ⇒ Object
Returns the value of attribute codes.
8 9 10 |
# File 'lib/ds/extractor/language.rb', line 8 def codes @codes end |
Instance Method Details
#to_a ⇒ Object
18 19 20 |
# File 'lib/ds/extractor/language.rb', line 18 def to_a [as_recorded, codes] end |
#to_h ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/ds/extractor/language.rb', line 22 def to_h { language_as_recorded: as_recorded, as_recorded: as_recorded, language_code: codes.join(';') } end |