jishan_fast_track_gem 0.1.6 → 0.1.7
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/lib/eligibility_check.rb +33 -46
- data/lib/jishan_fast_track_gem/version.rb +1 -1
- data/lib/jishan_fast_track_gem.rb +2 -2
- 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: 10f33c8671399f864f967ec948a70564c760a25141749d48d2d1b4081569525b
|
4
|
+
data.tar.gz: fa4f6265e42895b16660786b35c00141cb43cf4eacd016b11bb0ab035d7c8353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 746b9834e84a186455611f39e643eb96294b9f20b37f916dfa03d21b82645fa6f38816b22e88bcbbdcd2449727c57947cee8e37f70468ef9a7138b509e2705b0
|
7
|
+
data.tar.gz: 61e77209c2b6a2468c4ab62e5652862bb53ca2754da5ec293741440263cf04aed8f96dd5c2f27fe497b7da38d511781774d7f07bc03b5d164f02a97c633373d6
|
data/lib/eligibility_check.rb
CHANGED
@@ -10,72 +10,59 @@ class Solar_panel_rebate_egilibility_check
|
|
10
10
|
|
11
11
|
def ower_of_the_property
|
12
12
|
puts "Are you the property owner and the current occupier?".colorize(:light_blue)
|
13
|
-
puts "1.
|
14
|
-
puts "2. no".colorize(:light_blue)
|
13
|
+
puts "1. Yes 2. No".colorize(:light_blue)
|
15
14
|
answer = gets.chomp.to_i
|
16
|
-
|
17
|
-
|
18
|
-
received_solar_rebate_before
|
19
|
-
elsif answer == 2
|
20
|
-
puts "sorry, your are not eligible."
|
21
|
-
else
|
22
|
-
puts "no valid input."
|
23
|
-
end
|
15
|
+
return unless answer_check(answer)
|
16
|
+
received_solar_rebate_before
|
24
17
|
end
|
25
18
|
|
26
19
|
def received_solar_rebate_before
|
27
|
-
puts "
|
28
|
-
puts "1.
|
29
|
-
puts "2. no"
|
20
|
+
puts "Is this your first apply for solar panel rebate?".colorize(:light_blue)
|
21
|
+
puts "1. Yes 2. No".colorize(:light_blue)
|
30
22
|
answer = gets.chomp.to_i
|
31
|
-
|
32
|
-
|
33
|
-
elsif answer == 2
|
34
|
-
puts "check the next question."
|
35
|
-
existed_solar_panel
|
36
|
-
else
|
37
|
-
puts "no valid input."
|
38
|
-
end
|
23
|
+
return unless answer_check(answer)
|
24
|
+
existed_solar_panel
|
39
25
|
end
|
26
|
+
|
40
27
|
def existed_solar_panel
|
41
|
-
puts "
|
42
|
-
puts "1.
|
43
|
-
|
28
|
+
puts "Is this your first solar panel installation?".colorize(:light_blue)
|
29
|
+
puts "1. Yes 2. No".colorize(:light_blue)
|
30
|
+
|
44
31
|
answer = gets.chomp.to_i
|
45
|
-
|
46
|
-
|
47
|
-
elsif answer == 2
|
48
|
-
puts "check the next question."
|
49
|
-
combined_houshold_income
|
50
|
-
else
|
51
|
-
puts "no valid input."
|
52
|
-
end
|
32
|
+
return unless answer_check(answer)
|
33
|
+
combined_houshold_income
|
53
34
|
end
|
35
|
+
|
54
36
|
def combined_houshold_income
|
55
|
-
|
56
|
-
puts "1.
|
57
|
-
|
37
|
+
puts "Is your household income below $180,000aud?".colorize(:light_blue)
|
38
|
+
puts "1. Yes 2. No".colorize(:light_blue)
|
39
|
+
answer = gets.chomp.to_i
|
40
|
+
return unless answer_check(answer)
|
41
|
+
property_value
|
42
|
+
end
|
43
|
+
|
44
|
+
def property_value
|
45
|
+
puts "Is your property value less than $3 millions?" .colorize(:light_blue)
|
46
|
+
puts "1. Yes 2. No".colorize(:light_blue)
|
58
47
|
answer = gets.chomp.to_i
|
59
48
|
if answer == 1
|
60
|
-
puts "
|
61
|
-
property_value
|
49
|
+
puts "congrats! You are eligible for this rebate!".colorize(:light_red)
|
62
50
|
elsif answer == 2
|
63
|
-
|
51
|
+
puts "Sorry, your are not eligible."
|
64
52
|
else
|
65
53
|
puts "no valid input."
|
66
54
|
end
|
67
55
|
end
|
68
|
-
def
|
69
|
-
puts "Is your property value more than $3 millions ?"
|
70
|
-
puts "1. yes"
|
71
|
-
puts "2. no"
|
72
|
-
answer = gets.chomp.to_i
|
56
|
+
def answer_check(answer)
|
73
57
|
if answer == 1
|
74
|
-
puts "
|
58
|
+
puts "Please answer the next question.".colorize(:light_blue)
|
59
|
+
return true
|
75
60
|
elsif answer == 2
|
76
|
-
puts "
|
61
|
+
puts "Sorry, your are not eligible."
|
62
|
+
return false
|
77
63
|
else
|
78
|
-
puts "no valid input."
|
64
|
+
puts "It is no a valid input."
|
65
|
+
return false
|
79
66
|
end
|
80
67
|
end
|
81
68
|
end
|
@@ -8,10 +8,10 @@ require_relative 'manage_lists'
|
|
8
8
|
# Help file includes *comprehensive* instructions which *accurately* describe: steps to install the application; dependencies required by the application; system/hardware requirements; features of the application.
|
9
9
|
|
10
10
|
ruby = Solar_panel_rebate_egilibility_check.new("Ruby")
|
11
|
-
|
11
|
+
ruby.ower_of_the_property
|
12
12
|
|
13
13
|
john_files = Provided_files_check.new("john_files")
|
14
|
-
john_files.two_forms_of_identity
|
14
|
+
# john_files.two_forms_of_identity
|
15
15
|
john_rebate = Rebate_calculator.new
|
16
16
|
# john_rebate.stc_postcode_rating(3000)
|
17
17
|
# john_rebate.stc_calculator(5, 5)
|