Refactoring get_card_list.rb