class ECUtils::ECHelpers
Public Class Methods
instance()
click to toggle source
# File lib/ec_utils/ec_helpers.rb, line 6 def self.instance @@instance end
Public Instance Methods
get_used_card_from_file()
click to toggle source
# File lib/ec_utils/ec_helpers.rb, line 26 def get_used_card_from_file File.readlines('used_cards.txt').first.gsub(/\s+/, "") end
get_used_phone_number_from_file()
click to toggle source
# File lib/ec_utils/ec_helpers.rb, line 16 def get_used_phone_number_from_file File.readlines('used_phone_numbers.txt').first.gsub(/\s+/, "") end
is_app_opened()
click to toggle source
# File lib/ec_utils/ec_helpers.rb, line 30 def is_app_opened unless File.file?('app_opened.txt') return false else if File.readlines('app_opened.txt').last.gsub(/\s+/, "").to_i == 1 return true else return false end end end
is_changed_domain()
click to toggle source
# File lib/ec_utils/ec_helpers.rb, line 54 def is_changed_domain unless File.file?('domain_changed.txt') return false else if File.readlines('domain_changed.txt').last.gsub(/\s+/, "").to_i == 1 return true else return false end end end
save_used_card_to_file(card_number)
click to toggle source
# File lib/ec_utils/ec_helpers.rb, line 20 def save_used_card_to_file(card_number) File.open('used_cards.txt', 'a') do |f| f << "#{card_number}\n" end end
save_used_phone_number_to_file(phone_number)
click to toggle source
# File lib/ec_utils/ec_helpers.rb, line 10 def save_used_phone_number_to_file(phone_number) File.open('used_phone_numbers.txt', 'a') do |f| f << "#{phone_number}\n" end end
set_app_opened(value)
click to toggle source
# File lib/ec_utils/ec_helpers.rb, line 42 def set_app_opened(value) File.open('app_opened.txt', 'a') do |f| f << "#{value}\n" end end
set_changed_domain(value)
click to toggle source
# File lib/ec_utils/ec_helpers.rb, line 48 def set_changed_domain(value) File.open('domain_changed.txt', 'a') do |f| f << "#{value}\n" end end