Module: BigBrother::RoutingNumber
Instance Method Summary collapse
Instance Method Details
#routing_info(number) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bigbrother/routing_number.rb', line 13 def routing_info(number) bank = BigBrother::NUMBERS.find do |row| row[0].strip == number end return {} unless bank { routing_number: number, name: bank[2], address: bank[3], city: bank[4], state: bank[5], zip: bank[6] } end |
#valid_routing_number?(number) ⇒ Boolean
5 6 7 8 9 10 11 |
# File 'lib/bigbrother/routing_number.rb', line 5 def valid_routing_number?(number) found = BigBrother::NUMBERS.find do |row| row[0].strip == number end !!found end |