priceMarkup 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +46 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f089b6327f8edc82babba45e7c458970694033f7
|
4
|
+
data.tar.gz: 93f8094bf2d6b87a531f282e17770d2e0ccef31a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bedec74aef3fe0876b7b9507d9344608234b031c8b75534e0792b3eac8d57298ddc24a17eebd57d750c732d547e733c2218c9cd814ff815c859eef5d763fdb0
|
7
|
+
data.tar.gz: c9d603d8ff54040fbbf1da7c83e42154135500ecc7cb51b5770428a0e5ef47442c39fcf06e2af5d18681b13b53a07bd5f82c47e4f6d56d0c6cee5f0daa222284
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# Price Markup
|
2
|
+
|
3
|
+
This gem allows the selling price be calculated based on a markup value
|
4
|
+
|
5
|
+
The default markup is 0.25
|
6
|
+
|
7
|
+
The number of figures after the decimal point may be specified.
|
8
|
+
|
9
|
+
The default is zero if the first argument is an integer but two otherwise.
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
gem 'priceMarkup'
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle install
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install priceMarkup
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
> **Dowstore.priceMarkup( *price*, *markup*, *decimal\_places*)**
|
27
|
+
|
28
|
+
> Dowstore.priceMarkup(100) => "125"
|
29
|
+
|
30
|
+
> Dowstore.priceMarkup(100, 2) => "300"
|
31
|
+
|
32
|
+
> Dowstore.priceMarkup(100, 2, 3) => "300.000"
|
33
|
+
|
34
|
+
> Dowstore.priceMarkup(100, 2.5556, 1) => "355.6"
|
35
|
+
|
36
|
+
> Dowstore.priceMarkup(100.75, 2.5, 4) => "352.6250"
|
37
|
+
|
38
|
+
> Dowstore.priceMarkup(100.75, 2.5, 0) => "353"
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
Written by Thomas Dowling ([tomgdow](http://mathematica.stackexchange.com/users/106/tomd))
|
43
|
+
|
44
|
+
The National College of Ireland
|
45
|
+
|
46
|
+
thomasgdowling@gmail.com
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: priceMarkup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tomgdow
|
@@ -19,6 +19,7 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- Rakefile
|
21
21
|
- lib/priceMarkup.rb
|
22
|
+
- README.md
|
22
23
|
- test/test_priceMarkup.rb
|
23
24
|
homepage: http://rubygems.org/gems/priceMarkup
|
24
25
|
licenses:
|