Sha256: 44c3db6f938dce0ecf39d30fdab0841972917d0a2dc02fb5f1a39c99f2aafb5e

Contents?: true

Size: 721 Bytes

Versions: 4

Compression:

Stored size: 721 Bytes

Contents

#!/usr/bin/env ruby
ROOT = File.join(File.dirname(__FILE__), '..')
$LOAD_PATH << File.join(ROOT, 'lib')

require 'blz'

if ARGV.size != 2
  STDERR.puts "usage: blz [exact|match|city] <input>"
  exit 2
end

case ARGV.first
when "exact"
  results = BLZ::Bank.find_by_blz(ARGV[1], :exact => true)
  if results && results.size > 0
    results.each { |bank| STDOUT.puts bank }
  end
when "match"
  results = BLZ::Bank.find_by_blz(ARGV[1])
  if results && results.size > 0
    results.each { |bank| STDOUT.puts bank }
  end
when "city"
  results = BLZ::Bank.find_by_city(ARGV[1])
  if results && results.size > 0
    results.each { |bank| STDOUT.puts bank }
  end
else
  STDERR.puts "usage: blz [exact|match|city] input"
end


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blz-0.1.3 bin/blz
blz-0.1.2 bin/blz
blz-0.1.1 bin/blz
blz-0.1.0 bin/blz