2017-02-24から1日間の記事一覧

Ruby の Thor でコマンドを作る

Ruby でコマンドを作る。Gem 'Thor' を使う。まず $ gem install thor をする。Bundler を使うと bundle exec が必要になってしまうので、gem install の方がよい。greeting #!/usr/bin/env ruby require 'thor' class Greeting < Thor default_command :hel…