ryuta-ito
7/17/2016 - 7:10 AM

Thorfile

#  % tree  
# .
# ├── Thorfile
# ├── json
# └── template
#     └── hello.json.tt

# $ thor hello:hello
# hello
#      create  node/hello.json

class Hello < Thor
  include Thor::Actions

  desc :hello, 'hello'
  def hello
    puts 'hello'
    @hello = 'hello'
    template 'template/hello.json.tt', 'json/hello.json'
  end
end