Class: Candle::Generators::Blank
- Includes:
- CLIColorize
- Defined in:
- lib/candle/generators/blank.rb
Instance Method Summary collapse
Methods inherited from Jam
attr_rw, banner, #create_jam, #in_app_root?, init_generator, parseTemplate, source_root
Instance Method Details
#create_project ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/candle/generators/blank.rb', line 31 def create_project valid_constant?([:project] || name) @project_name = ([:app] || name).gsub(/\W/, "_").downcase @class_name = ([:app] || name).gsub(/\W/, "_").capitalize @developer = "#{`whoami`.strip}" @created_on = Date.today.to_s self.destination_root = [:root] project = [:project] self.behavior = :revoke if [:destroy] puts colorize( "Candle Version: #{Candle::Version::STRING}", { :foreground => :red, :background => :white, :config => :underline } ) puts eval(File.read(__FILE__) =~ /^__END__\n/ && $' || '') say (<<-TEXT).gsub(/ {10}/,'') ================================================================= Your #{@project_name} wax application has been generated. Open #{@project_name}.xcodeproj Build and Run ================================================================= TEXT end |