Skip to content

pan/camdict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A ruby gem - camdict

Build Status Code Climate

Introduction

The ruby gem camdict is a Cambridge online dictionary client. You could use this excellent dictionary with a browser, but now it is possible to use it with this ruby API in your code.

Installation

gem install camdict

Verification

The gem can be tested by below commands in the directory where it's installed. rake - run all the testcases which don't need internet connection. rake itest - run all the testcases that need internet connection. rake testall - run all above tests.

Usage

    require 'camdict'

    # Look up a new word
    word = Camdict::Word.new 'health'

    # Print the part of speech
    puts health.part_of_speech   #=> noun

    # What's the first meaning
    puts health.meaning          #=>
    # the condition of the body and the degree to which it is free from
    # illness, or the state of being well:

    # all meanings
    puts health.meanings         #=> in addition to above meaning, it prints
    # the condition of something that changes or develops, such as an
    # organization or system:

Need more? try health.print to show more data in a friendly format.

Versioning

The release of this gem follows the semantic versioning rules.

Licence MIT

Copyright (c) 2014-2017 Pan Gaoyong

About

A ruby gem camdict - Cambridge online dictionary client

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages