Method: Starter#initialize
- Defined in:
- lib/r4/starter.rb
#initialize(*args) ⇒ Starter
Returns a new instance of Starter.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/r4/starter.rb', line 9 def initialize(*args) super if ARGV[0] =~ /new/ @dir = `pwd`.gsub("\n", '') elsif ARGV[0] =~ /add/ if yes? 'Are you in right folder of your app?' @project_path = `pwd`.gsub("\n", '') @project_name = @project_path.split('/').last @project_label = @project_name.capitalize.gsub('_', ' ') else say 'Get to proper directory', :red abort end end end |