Last active
July 17, 2016 07:36
-
-
Save ryuta-ito/6354ed266e83315f71173f702ee7620a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# % 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment