Top Level Namespace

Constant Summary collapse

SPACES =
"18"

Instance Method Summary collapse

Instance Method Details

#blue(text, how_many_spaces) ⇒ Object



17
# File 'lib/npa_lookup.rb', line 17

def blue(text,how_many_spaces); colorize(text, 34,how_many_spaces); end

#colorize(text, color_code, how_many_spaces) ⇒ Object



10
11
12
# File 'lib/npa_lookup.rb', line 10

def colorize(text, color_code,how_many_spaces)
  "\e[#{color_code}m#{text}\e[#{how_many_spaces}C\033[0m\033[0m"
end

#cyan(text, how_many_spaces) ⇒ Object



18
# File 'lib/npa_lookup.rb', line 18

def cyan(text,how_many_spaces); colorize(text, 36,how_many_spaces); end

#green(text, how_many_spaces) ⇒ Object



15
# File 'lib/npa_lookup.rb', line 15

def green(text,how_many_spaces); colorize(text, 32,how_many_spaces); end

#parse_args(i) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/npa_lookup.rb', line 21

def parse_args(i)
  i=i.to_s
  if i.length==3
    return i
  elsif i.length==6
    i=i.dup
    i.insert(3, '/')
  elsif i.length==10
    return i
  else
    puts "Error {NumberError}"
    exit!
  end
end

#red(text, how_many_spaces) ⇒ Object



14
# File 'lib/npa_lookup.rb', line 14

def red(text,how_many_spaces); colorize(text, 31,how_many_spaces); end

#white(test, how_many_spaces) ⇒ Object



19
# File 'lib/npa_lookup.rb', line 19

def white(test,how_many_spaces);colorize(test,37,how_many_spaces);end

#yellow(text, how_many_spaces) ⇒ Object



16
# File 'lib/npa_lookup.rb', line 16

def yellow(text,how_many_spaces); colorize(text, 33,how_many_spaces); end