nyros_form 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d782ab4b92c917ba06e573de04e20ad4172cc7ee50ad01ca3f52896c7769426
4
- data.tar.gz: 1bf2969182e00fa92d609e09c711513ba238d364d9049d45a486d1396a4976f2
3
+ metadata.gz: 025a27ccf90bacd750e52d9066dfb7d81c81458fca22fdf49814f89c17816e3a
4
+ data.tar.gz: edb357856e61565279a8884aacaabbe4373d333eeb3620b8003e9811ccd13efb
5
5
  SHA512:
6
- metadata.gz: 32e52c21cbb6a0e9d9695f57f3da7bffc34b57d742d74ba710aac93ee46bf7f4fe28b87fb0ede8818abaac539d62d6b40ad223834a6c57dbe9f43a8c9d5ed86e
7
- data.tar.gz: be09d47bff3f4f2e52fbcfcac2bbf25eddf0596a6f2a9fa30c84f11c3054b0ba0b6bdfee81fb36968b7bff68693b60a0e7d9057a68ce25fc2616cfd5e5c96be5
6
+ metadata.gz: e4b6dfe7e7a15beda690728e34061eb9d6b830e576972eaf1052449f5885f143976245336d32b39de1a3e1f32ebf61f43431ff3b7eceb6b4e39a7fbe44044d0c
7
+ data.tar.gz: 38c3f93254e71fd8f6a44dbfa14f749fd0c28ee2387876a9a003733d59148d2a401a553b225159dc237274da0b5d25fbef5412e2179d59f510a8cd46c270db54
File without changes
@@ -8,34 +8,32 @@ end
8
8
 
9
9
  module NyrosForm
10
10
 
11
- # class Builder
12
- # def initialize total:, gratuity:
13
- # @total = total
14
- # @gratuity = gratuity
15
- # end
11
+ class Builder
12
+ def initialize total:, gratuity:
13
+ @total = total
14
+ @gratuity = gratuity
15
+ end
16
16
 
17
17
  def generate
18
- "Hello hhh"
18
+ return calculation if number_based?
19
+ string_based
19
20
  end
20
21
 
21
- # def number_based?
22
- # (@gratuity.is_a? Numeric) || (@gratuity.integer?)
23
- # end
24
-
25
- # def string_based
26
- # case @gratuity.downcase
27
- # when 'high' then calculation 100
28
- # when 'standard' then calculation 50
29
- # when 'low' then calculation 25
30
- # end
31
- # end
32
-
33
- # def calculation gratuity = @gratuity
34
- # @total += @total * (gratuity.to_f / 100)
35
- # end
36
- # end
37
-
22
+ def number_based?
23
+ (@gratuity.is_a? Numeric) || (@gratuity.integer?)
24
+ end
38
25
 
26
+ def string_based
27
+ case @gratuity.downcase
28
+ when 'high' then calculation 25
29
+ when 'standard' then calculation 18
30
+ when 'low' then calculation 15
31
+ end
32
+ end
39
33
 
34
+ def calculation gratuity = @gratuity
35
+ @total += @total * (gratuity.to_f / 100)
36
+ end
37
+ end
40
38
 
41
39
  end
@@ -1,3 +1,3 @@
1
1
  module NyrosForm
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nyros_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - raju rekadi
@@ -66,12 +66,14 @@ files:
66
66
  - Gemfile.lock
67
67
  - README.md
68
68
  - Rakefile
69
+ - app/helpers/time_ago_helper.rb
69
70
  - bin/console
70
71
  - bin/setup
71
72
  - lib/nyros_form.rb
72
73
  - lib/nyros_form/builder.rb
73
74
  - lib/nyros_form/version.rb
74
75
  - nyros_form.gemspec
76
+ - vendor/assets/javascripts/jquery.time_ago.js
75
77
  homepage: https://github.com/nraju-nyros/nyros_form
76
78
  licenses: []
77
79
  metadata: {}