Class: Candle::Generators::Xib

Inherits:
Jam
  • Object
show all
Includes:
CLIColorize
Defined in:
lib/candle/generators/xib.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_projectObject



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/xib.rb', line 31

def create_project
  valid_constant?(options[:project] || name)
  @project_name = (options[:app] || name).gsub(/\W/, "_").downcase
  @class_name = (options[:app] || name).gsub(/\W/, "_").capitalize
  @developer = "#{`whoami`.strip}"
  @created_on = Date.today.to_s
  self.destination_root = options[:root]
  project = options[:project]
  self.behavior = :revoke if options[: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