nyros_form 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/nyros_form/builder.rb +31 -31
- data/lib/nyros_form/version.rb +1 -1
- data/lib/nyros_form.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: 1c09881a22afee02cd14bb80112a0ee0d412b138cb0aa9947879a838f460d45e
|
4
|
+
data.tar.gz: 2e191c996c95312c7b295326412448ac9b64724a4a51f33b2f31420c7565fc89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71c3155b4e54f2e05bb83bc455d2db798302f9bdac4a0af34856ab9f0ae0da949f84df2c91140086793bff1c699f38eeec25247eea5d92bb8cdc8efb0a6c43d6
|
7
|
+
data.tar.gz: 84072e342f7fd6faf8f8c47ba4974dbf9010ce8468e663981e21ba1d105075d861983b4d1bc1cf9732f31e903d5619e612a36328e44ac6ce0c43f57335092952
|
data/Gemfile.lock
CHANGED
data/lib/nyros_form/builder.rb
CHANGED
@@ -1,39 +1,39 @@
|
|
1
1
|
|
2
|
-
class String
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
end
|
2
|
+
# class String
|
3
|
+
# def integer?
|
4
|
+
# return true if self =~ /^[1-9]\d*(\.\d+)?$/
|
5
|
+
# false
|
6
|
+
# end
|
7
|
+
# end
|
8
8
|
|
9
9
|
module NyrosForm
|
10
10
|
|
11
11
|
class Builder
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
12
|
+
# def initialize total:, gratuity:
|
13
|
+
# @total = total
|
14
|
+
# @gratuity = gratuity
|
15
|
+
# end
|
16
|
+
|
17
|
+
# def generate
|
18
|
+
# return calculation if number_based?
|
19
|
+
# string_based
|
20
|
+
# end
|
21
|
+
|
22
|
+
# def number_based?
|
23
|
+
# (@gratuity.is_a? Numeric) || (@gratuity.integer?)
|
24
|
+
# end
|
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
|
33
|
+
|
34
|
+
# def calculation gratuity = @gratuity
|
35
|
+
# @total += @total * (gratuity.to_f / 100)
|
36
|
+
# end
|
37
37
|
end
|
38
38
|
|
39
39
|
end
|
data/lib/nyros_form/version.rb
CHANGED
data/lib/nyros_form.rb
CHANGED