Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cnb

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cnb

  • 2.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

CNB

Gem Version Build Status Dependency Status Code Climate Test Coverage

CNB is a gem that will help you get daily and monthly currency rates for czech crown (CZK) from Czech National Bank.

Install

Add following into your Gemfile

gem 'cnb'

Or install the gem by on your own

gem install cnb

Usage

Daily

CNB.daily_rate('AUD', Date.today)

Returns today's exchange rate between CZK and AUD. Input date defaults to Date.today so the above line can written like this:

CNB.daily_rate('AUD')

Monthly

CNB.monthly_rate('ALL', Date.today)

Returns today's exchange rate between CZK and ALL (Albanian lek).

Exceptions
  • DateTooOld - triggers when date entered is older than 24 years, or 10 years if monthly.
  • DateInFuture - triggers when date enetered is in future.
  • CurrencyMissing - triggers when currency is not present.
  • CurrencyNotSupported - triggers when currency is not in downloaded list of currencies.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT License. Copyright (c) 2014

FAQs

Package last updated on 05 Dec 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc