class RubyNEAT::Cli::Generator::NewProject
Attributes
ruby[RW]
Public Instance Methods
create_project_bin_files()
click to toggle source
# File lib/rubyneat/cli/generate.rb, line 39 def create_project_bin_files tcopy %w{ neat }. map{ |pfile| ["bin/#{pfile}", "#{name.snake}/bin/#{pfile}"] }, exec: true end
create_project_config_files()
click to toggle source
# File lib/rubyneat/cli/generate.rb, line 44 def create_project_config_files tcopy %w{ boot.rb }. map{|pfile| ["config/#{pfile}", "#{name.snake}/config/#{pfile}"]} end
create_project_directories()
click to toggle source
# File lib/rubyneat/cli/generate.rb, line 24 def create_project_directories inside name.snake do %w{neater lib config tmp log bin}. each {|dir| empty_directory dir} end end
create_project_directory()
click to toggle source
# File lib/rubyneat/cli/generate.rb, line 20 def create_project_directory empty_directory name.snake end
create_project_root_files()
click to toggle source
# File lib/rubyneat/cli/generate.rb, line 31 def create_project_root_files @ruby = OpenStruct.new version: RUBY_VERSION, engine: RUBY_ENGINE, platform: RUBY_PLATFORM tcopy %w{Gemfile README.md}. map{ |pfile| [pfile, "#{name.snake}/#{pfile}"] } end
Private Instance Methods
tcopy(from_to_list, exec: false)
click to toggle source
# File lib/rubyneat/cli/generate.rb, line 50 def tcopy(from_to_list, exec: false) from_to_list.each{ |from, to| template from, to File.chmod(0755, to) if exec } end