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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ec4f39f10b769ad26c77963227d7ff17dd00725d9b0ce024ae743dd25ab7c87
4
- data.tar.gz: 56a26de9b2674c9fc7a1b5633b150bf96b432944d7f25d83cd1acb56f9c12eb7
3
+ metadata.gz: 10f33c8671399f864f967ec948a70564c760a25141749d48d2d1b4081569525b
4
+ data.tar.gz: fa4f6265e42895b16660786b35c00141cb43cf4eacd016b11bb0ab035d7c8353
5
5
  SHA512:
6
- metadata.gz: 96c31b631f28cd44466bb41ff8356adeae0669bc2d3a83931abf04996cfbf05018d73aed3ff6bd0a224da26b33a78105e80948a37cd26cae660153fac272ed01
7
- data.tar.gz: 369d2495e09b5c05782b4878e2c861b1df76611973a15826bd6418f13cd385ab0e02177184a2853b70552676db585c47c89a71f8fdda3190e0596120e4dd15e6
6
+ metadata.gz: 746b9834e84a186455611f39e643eb96294b9f20b37f916dfa03d21b82645fa6f38816b22e88bcbbdcd2449727c57947cee8e37f70468ef9a7138b509e2705b0
7
+ data.tar.gz: 61e77209c2b6a2468c4ab62e5652862bb53ca2754da5ec293741440263cf04aed8f96dd5c2f27fe497b7da38d511781774d7f07bc03b5d164f02a97c633373d6
@@ -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. yes".colorize(:light_blue)
14
- puts "2. no".colorize(:light_blue)
13
+ puts "1. Yes 2. No".colorize(:light_blue)
15
14
  answer = gets.chomp.to_i
16
- if answer == 1
17
- puts "check the next question."
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 "Have you received solar panel rebate before?"
28
- puts "1. yes"
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
- if answer == 1
32
- puts "sorry, your are not eligible."
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 "Do you have an existed solar panel?"
42
- puts "1. yes"
43
- puts "2. no"
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
- if answer == 1
46
- puts "sorry, your are not eligible."
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
- puts "Is your household income below $180,000aud ?"
56
- puts "1. yes"
57
- puts "2. no"
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 "check the next question."
61
- property_value
49
+ puts "congrats! You are eligible for this rebate!".colorize(:light_red)
62
50
  elsif answer == 2
63
- puts "sorry, your are not eligible."
51
+ puts "Sorry, your are not eligible."
64
52
  else
65
53
  puts "no valid input."
66
54
  end
67
55
  end
68
- def property_value
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 "sorry, your are not eligible."
58
+ puts "Please answer the next question.".colorize(:light_blue)
59
+ return true
75
60
  elsif answer == 2
76
- puts "congrats! You are eligible for this rebate!"
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
@@ -1,3 +1,3 @@
1
1
  module JishanFastTrackGem
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  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
- # ruby.ower_of_the_property
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jishan_fast_track_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jishan_Lu