currency_formatter 0.0.1 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/currency_formatter.rb +0 -1
- data/lib/currency_formatter/helper.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a090e4682b2a94a8e92d9f8899e8b9a25e442cb919802e24262372afd0e1e65
|
4
|
+
data.tar.gz: 183965511828be89d0a3629a05f5e964db4bcb671997a9269f76f6e9b257dab8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eeb9d2d9cea288b3c7375db9ca08246017dacff8ee9a9bc92429eb624d8b115d5ea20b7e6d19375d2bca8e2ebe1be662486cf8cc17e89b6ac395623cd435a95d
|
7
|
+
data.tar.gz: f094b725686a6f888894103f741f6ab7d6fc0e345db15ef551b25af6f1fc1223b3c9f7df3eeda3980fb831c574a91844ed7ce2b2afa696b6aa518153dbacb371
|
data/lib/currency_formatter.rb
CHANGED
@@ -2,12 +2,12 @@ require 'action_controller'
|
|
2
2
|
|
3
3
|
module CurrencyFormatter
|
4
4
|
module Helper
|
5
|
-
def
|
6
|
-
|
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
|
10
|
-
ActionController::Base.helpers.number_to_currency amount.to_f, unit: '
|
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.
|
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-
|
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
|