Sha256: 3a7009e73f4c5761173ce79df7d9bb2f7eae7fed57ef1fa14ce1704d04d2896b

Contents?: true

Size: 538 Bytes

Versions: 4

Compression:

Stored size: 538 Bytes

Contents

# frozen_string_literal: true

module DeepL
  module Requests
    module Glossary
      class Entries < Base
        attr_reader :id

        def initialize(api, id, options = {})
          super(api, options)
          @id = id
        end

        def request
          build_entries(*get)
        end

        private

        def build_entries(_, response)
          response.body.split("\n").map { |entry| entry.split("\t") }
        end

        def path
          "glossaries/#{id}/entries"
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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