Skip to content

Commit

Permalink
Merge 25c88d5 into 626391d
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Mar 21, 2019
2 parents 626391d + 25c88d5 commit c5ac1ab
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,12 @@ rescue Kokki::InvalidInputError => e
# => invalid input: test
end
```

### CLI

```bash
$ kokki TW
🇹🇼
$ kokki japan
🇯🇵
```
17 changes: 17 additions & 0 deletions exe/kokki
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require "bundler/setup"
require "kokki"

input = ARGV.first

if input
begin
puts Kokki.flagize(input)
rescue Kokki::InvalidInputError => e
puts e.message
end
else
puts "Input not found: plase give a word to convert."
end

0 comments on commit c5ac1ab

Please sign in to comment.