currency_formatter 0.0.1 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f9b63f653728cd03d5d9413b04a2611a5658b007dfa73fd26c02f33580ab80b
4
- data.tar.gz: 2aaf405a904ffc2a79fba23a4c45769a75e39b1e6b585dafa9cd936db754050c
3
+ metadata.gz: 2a090e4682b2a94a8e92d9f8899e8b9a25e442cb919802e24262372afd0e1e65
4
+ data.tar.gz: 183965511828be89d0a3629a05f5e964db4bcb671997a9269f76f6e9b257dab8
5
5
  SHA512:
6
- metadata.gz: ff9e59818d1d56d34866c8b04cb4db087b143c63dd06361a11fc02217edaf571f6f51023f389d6c8dbc4675c13d1e607022e28eda3a3607a4a0eccee86fe8eeb
7
- data.tar.gz: f0d2c6e542a70649213f22f73b1dab3019966c5a4e272e8d7820988286e6560ffcb0ad2ab4d84eff968f93549d8d5eee2ab96c3ab8db93bf6a54b8ad6cf06832
6
+ metadata.gz: eeb9d2d9cea288b3c7375db9ca08246017dacff8ee9a9bc92429eb624d8b115d5ea20b7e6d19375d2bca8e2ebe1be662486cf8cc17e89b6ac395623cd435a95d
7
+ data.tar.gz: f094b725686a6f888894103f741f6ab7d6fc0e345db15ef551b25af6f1fc1223b3c9f7df3eeda3980fb831c574a91844ed7ce2b2afa696b6aa518153dbacb371
@@ -3,4 +3,3 @@ require 'currency_formatter/helper'
3
3
  ActiveSupport.on_load(:action_view) do
4
4
  include CurrencyFormatter::Helper
5
5
  end
6
-
@@ -2,12 +2,12 @@ require 'action_controller'
2
2
 
3
3
  module CurrencyFormatter
4
4
  module Helper
5
- def self.hi
6
- puts "Hello world!"
5
+ def idr(amount)
6
+ ActionController::Base.helpers.number_to_currency amount.to_f, unit: 'Rp ', separator: ',', delimiter: '.', precision: 2
7
7
  end
8
8
 
9
- def self.idr(amount)
10
- ActionController::Base.helpers.number_to_currency amount.to_f, unit: 'Rp ', separator: ',', delimiter: '.', precision: 2
9
+ def usd(amount)
10
+ ActionController::Base.helpers.number_to_currency amount.to_f, unit: '$ ', separator: '.', delimiter: ',', precision: 2
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currency_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - habiburrahman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-10 00:00:00.000000000 Z
11
+ date: 2020-12-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple currency formatter
14
14
  email: habib.maison@gmail.com