Sha256: 3147271cbde5b09c836659fe1ca177db9c756f30f8faef0d5245f83fe71048f9

Contents?: true

Size: 223 Bytes

Versions: 3

Compression:

Stored size: 223 Bytes

Contents

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

    def to_s
      # https://dictionaryapi.com/products/json#sec-3.synlist
      @data.fetch("wd")
    end
    alias to_str to_s
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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