Sha256: 552f60ccd7c93ffe7239aaa11dae807a40a8ae671eb9303f9d66d05baa417f54
Contents?: true
Size: 1.91 KB
Versions: 3
Compression:
Stored size: 1.91 KB
Contents
require 'uri' require 'csv' require 'colorize' class Solar_panel_rebate_egilibility_check def initialize(name) @name = name end def ower_of_the_property puts "Are you the property owner and the current occupier?".colorize(:light_blue) puts "1. yes".colorize(:light_blue) puts "2. no".colorize(:light_blue) answer = gets.chomp.to_i if answer == 1 puts "check the next question." received_solar_rebate_before elsif answer == 2 puts "sorry, your are not eligible." else puts "no valid input." end end def received_solar_rebate_before puts "Have you received solar panel rebate before?" puts "1. yes" puts "2. no" answer = gets.chomp.to_i if answer == 1 puts "sorry, your are not eligible." elsif answer == 2 puts "check the next question." existed_solar_panel else puts "no valid input." end end def existed_solar_panel puts "Do you have an existed solar panel?" puts "1. yes" puts "2. no" answer = gets.chomp.to_i if answer == 1 puts "sorry, your are not eligible." elsif answer == 2 puts "check the next question." combined_houshold_income else puts "no valid input." end end def combined_houshold_income puts "Is your household income below $180,000aud ?" puts "1. yes" puts "2. no" answer = gets.chomp.to_i if answer == 1 puts "check the next question." property_value elsif answer == 2 puts "sorry, your are not eligible." else puts "no valid input." end end def property_value puts "Is your property value more than $3 millions ?" puts "1. yes" puts "2. no" answer = gets.chomp.to_i if answer == 1 puts "sorry, your are not eligible." elsif answer == 2 puts "congrats! You are eligible for this rebate!" else puts "no valid input." end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jishan_fast_track_gem-0.1.6 | lib/eligibility_check.rb |
jishan_fast_track_gem-0.1.5 | lib/eligibility_check.rb |
jishan_fast_track_gem-0.1.4 | lib/eligibility_check.rb |