🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ldoce

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldoce

0.0.2
Rubygems
Version published
Maintainers
1
Created
Source

Ldoce

Easily interface with the Longman Dictionary of Contemporary English API from Ruby:

NB currently mac only as it depends on the afplay command.

##Prerequisites

  • afplay
  • curl

Installation

Add this line to your application's Gemfile:

gem 'ldoce'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ldoce

Usage

Ldoce::Word.api_key = "<your_key>"

cat = Ldoce::Word.search 'cat'
cat.play #plays mp3 sample - only working for Mac at the moment
cat.definition
#=> "A small four legged animal commonly kept as a pet"

Ldoce::Word.play 'cat'
#=> <Ldoce::Word: cat "A small four legged animal commonly kept as a pet">

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 20 Feb 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts