Sha256: fae1b667ddf0abc32caa42429f882de571a66a1a957ee18827e68c58e54dd2b0

Contents?: true

Size: 267 Bytes

Versions: 3

Compression:

Stored size: 267 Bytes

Contents

require "synonymous/sense"

module Synonymous
  class Definition
    def initialize(data)
      @data = data
    end

    def senses
      # https://dictionaryapi.com/products/json#sec-2.sseq
      @data.fetch("sseq").map { |data| Sense.new(data) }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
synonymous-0.3.0 lib/synonymous/definition.rb
synonymous-0.2.0 lib/synonymous/definition.rb
synonymous-0.1.0 lib/synonymous/definition.rb