Sha256: 50b0a21f701d7e08bf7c53662ba17207c02d0a448e3dbc63c503349d09dc54c0

Contents?: true

Size: 623 Bytes

Versions: 4

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

module DeepL
  module Resources
    class Glossary < Base
      attr_reader :id, :name, :ready, :source_lang, :target_lang, :creation_time, :entry_count

      def initialize(glossary, *args)
        super(*args)

        @id = glossary['glossary_id']
        @name = glossary['name']
        @ready = glossary['ready']
        @source_lang = glossary['source_lang']
        @target_lang = glossary['target_lang']
        @creation_time = glossary['creation_time']
        @entry_count = glossary['entry_count']
      end

      def to_s
        "#{id} - #{name}"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
deepl-rb-2.5.3 lib/deepl/resources/glossary.rb
deepl-rb-2.5.2 lib/deepl/resources/glossary.rb
deepl-rb-2.5.1 lib/deepl/resources/glossary.rb
deepl-rb-2.5.0 lib/deepl/resources/glossary.rb