Class: Retter::Generator::Creator
- Inherits:
-
Base
- Object
- Thor::Group
- Base
- Retter::Generator::Creator
show all
- Defined in:
- lib/retter/generator/creator.rb
Constant Summary
Constants inherited
from Base
Base::FILES, Base::TEMPLATES
Instance Method Summary
collapse
Methods inherited from Base
#bundle_install, #create_files, source_root
Instance Method Details
#git_init ⇒ Object
4
5
6
|
# File 'lib/retter/generator/creator.rb', line 4
def git_init
Grit::Repo.init "#{Dir.pwd}/#{name}"
end
|
#notice_how_to_use ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/retter/generator/creator.rb', line 8
def notice_how_to_use
editor = ENV['EDITOR']
say "-- Thanks for flying Retter :-> --\n", :green
say "Setting $EDITOR:\nretter *requires* $EDITOR variable.\nexample:\n echo \"export EDITOR=vim\" >> ~/.zshenv # or ~/.bash_profile\n . ~/.zshenv\n EOM\n\n say \" Current your $EDITOR is \#{editor ? editor : 'undefined'}.\\n\", :red\n\n say <<-EOM, :green\nSetting $RETTER_HOME:\nYou can use retter command anywhere, If you set $RETTER_HOME variable.\nexample:\n echo \"export RETTER_HOME=\#{Dir.pwd}/\#{name}\" >> ~/.zshenv\n ...\n\nSee also:\nretter usage\nretter help\n EOM\nend\n", :green
|