nyros_form 0.1.2 → 0.1.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/nyros_form/builder.rb +23 -21
- data/lib/nyros_form/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d782ab4b92c917ba06e573de04e20ad4172cc7ee50ad01ca3f52896c7769426
|
4
|
+
data.tar.gz: 1bf2969182e00fa92d609e09c711513ba238d364d9049d45a486d1396a4976f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32e52c21cbb6a0e9d9695f57f3da7bffc34b57d742d74ba710aac93ee46bf7f4fe28b87fb0ede8818abaac539d62d6b40ad223834a6c57dbe9f43a8c9d5ed86e
|
7
|
+
data.tar.gz: be09d47bff3f4f2e52fbcfcac2bbf25eddf0596a6f2a9fa30c84f11c3054b0ba0b6bdfee81fb36968b7bff68693b60a0e7d9057a68ce25fc2616cfd5e5c96be5
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -32,4 +32,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/nraju-nyros/nyros_form.
|
data/lib/nyros_form/builder.rb
CHANGED
@@ -8,32 +8,34 @@ end
|
|
8
8
|
|
9
9
|
module NyrosForm
|
10
10
|
|
11
|
-
class Builder
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
# class Builder
|
12
|
+
# def initialize total:, gratuity:
|
13
|
+
# @total = total
|
14
|
+
# @gratuity = gratuity
|
15
|
+
# end
|
16
16
|
|
17
17
|
def generate
|
18
|
-
|
19
|
-
string_based
|
18
|
+
"Hello hhh"
|
20
19
|
end
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
|
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
|
+
|
25
38
|
|
26
|
-
def string_based
|
27
|
-
case @gratuity.downcase
|
28
|
-
when 'high' then calculation 100
|
29
|
-
when 'standard' then calculation 50
|
30
|
-
when 'low' then calculation 25
|
31
|
-
end
|
32
|
-
end
|
33
39
|
|
34
|
-
def calculation gratuity = @gratuity
|
35
|
-
@total += @total * (gratuity.to_f / 100)
|
36
|
-
end
|
37
|
-
end
|
38
40
|
|
39
41
|
end
|
data/lib/nyros_form/version.rb
CHANGED