tippy_mun 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: bbc3b105bdd049e63a783aaf0707e6a27b765091
4
- data.tar.gz: 8e268ae7737453a33e953d51f459bf1af9dc6122
3
+ metadata.gz: 677e6298c34a612696e023e3afc2362bbdf8b68b
4
+ data.tar.gz: a666afded2a9dcbc8e7ac8498ca77ea6a7a5ec36
5
5
  SHA512:
6
- metadata.gz: 3067486424ac362698e1212910bd3df77882e4bbb069170c7c911b4e8cd0f2bdc18a5c7143c2b00e0c0d0ddd59b7df6245f615ad7f9acf9232c35a848498cbe0
7
- data.tar.gz: dd0f9f4a39edee64f5a43a759c5fe6eff8c1a46119267e38ad9026d2a7cb2f45ee6f8cbd9bd074a1565d621476634fe94cfb6941d1fdcf74e1f4f47109daa208
6
+ metadata.gz: ede11523240bcb4a2c1b9d01da8f724063dda26e4372d73eb857dc8aeac85d09ec7ab772af75bb353405dd9dba686457bb79a9c4bf01b48f52202c5b7b65ffbf
7
+ data.tar.gz: 23debb03e935f8a6eb90dd32c3f626b9d876e2e374afd787c0445d67e206d067f215b426e1f47a267a5624926084c6eff797101884c1b1340280a9b49c88bdf6
data/Gemfile.lock ADDED
@@ -0,0 +1,35 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ tippy_mun (0.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.3)
10
+ rake (10.5.0)
11
+ rspec (3.6.0)
12
+ rspec-core (~> 3.6.0)
13
+ rspec-expectations (~> 3.6.0)
14
+ rspec-mocks (~> 3.6.0)
15
+ rspec-core (3.6.0)
16
+ rspec-support (~> 3.6.0)
17
+ rspec-expectations (3.6.0)
18
+ diff-lcs (>= 1.2.0, < 2.0)
19
+ rspec-support (~> 3.6.0)
20
+ rspec-mocks (3.6.0)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.6.0)
23
+ rspec-support (3.6.0)
24
+
25
+ PLATFORMS
26
+ ruby
27
+
28
+ DEPENDENCIES
29
+ bundler (~> 1.16.a)
30
+ rake (~> 10.0)
31
+ rspec (~> 3.0)
32
+ tippy_mun!
33
+
34
+ BUNDLED WITH
35
+ 1.16.0.pre.2
@@ -1,3 +1,9 @@
1
+ class String
2
+ def integeri?
3
+ return true if self =~ /^[1-9]\d*(\.\d+)?$/
4
+ end
5
+ end
6
+
1
7
  module TippyMun
2
8
  class Builder
3
9
  def initialize :total, :quantity
@@ -10,12 +16,12 @@ module TippyMun
10
16
  string_based?
11
17
  end
12
18
 
13
- def string_based?
19
+ def number_based?
14
20
  (@gratuity.is_a? Numeric) || (@gratuity.integer?)
15
21
  end
16
22
 
17
23
  def string_based
18
- def @gratuity.downcase
24
+ case @gratuity.downcase
19
25
  when 'high' then calculation 25
20
26
  when 'standard' then calculation 18
21
27
  when 'low' then calculation 15
@@ -1,3 +1,3 @@
1
1
  module TippyMun
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tippy_mun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Munir
@@ -64,6 +64,7 @@ files:
64
64
  - ".travis.yml"
65
65
  - CODE_OF_CONDUCT.md
66
66
  - Gemfile
67
+ - Gemfile.lock
67
68
  - LICENSE.txt
68
69
  - README.md
69
70
  - Rakefile
@@ -71,7 +72,6 @@ files:
71
72
  - bin/setup
72
73
  - lib/.tippy_mun.rb.swp
73
74
  - lib/tippy_mun.rb
74
- - lib/tippy_mun/.builder.rb.swp
75
75
  - lib/tippy_mun/builder.rb
76
76
  - lib/tippy_mun/version.rb
77
77
  - tippy_mun.gemspec
Binary file