New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

country_currency

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

country_currency

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

CountryCurrency

DESCRIPTION:

Provides ISO codes, names and currencies for countries.

Ruby Version >= 2.4

USE:

# Search by country (Argentina)
country = CountryCurrency.find('AR')        # Alpha2
country = CountryCurrency.find('ARG')       # Alpha3
country = CountryCurrency.find('Argentina') # Iso name

# Attributes
country.currency        # => "ARS"
country.currency_symbol # => "$"
country.alpha2          # => "AR"
country.alpha3          # => "ARS"
country.calling         # => "+54" phone number prefix

# Search by country (United States)
country = CountryCurrency.find('US')            # Alpha2
country = CountryCurrency.find('USA')           # Alpha3
country = CountryCurrency.find('United States') # Iso name

# Attributes
country.currency        # => "USD"
country.currency_symbol # => "u$d"
country.alpha2          # => "US"
country.alpha3          # => "USA"
country.calling         # => "+1" phone number prefix

console:

$ rake console

test:

$ rake test

FAQs

Package last updated on 04 Jan 2022

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