Class: Kokki::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/kokki/cli.rb

Class Method Summary collapse

Class Method Details

.start(input) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/kokki/cli.rb', line 5

def self.start(input)
  if input
    begin
      print Kokki.flagize(input.chomp)
    rescue Kokki::InvalidInputError => e
      puts e.message
    end
  else
    puts "Input not found: please give a word to convert."
  end
end