Class: Candle::Generators::Help

Inherits:
Jam
  • Object
show all
Includes:
CLIColorize, Actions, Thor::Actions
Defined in:
lib/candle/generators/help.rb

Constant Summary collapse

RENDER_OPTIONS =
{ :fields => [:category,:command,:description] }

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Actions

#apply_component_for, #ask, #check_app_existence, #destination_root, #execute_component_setup, #fetch_app_name, #fetch_component_choice, #in_app_root?, included, #invalid_fields, #resolve_valid_choice, #retrieve_component_config, #store_component_choice, #store_component_config, #valid_choice?, #valid_constant?, #which

Methods inherited from Jam

attr_rw, #create_jam, #in_app_root?, init_generator, parseTemplate

Class Method Details



21
# File 'lib/candle/generators/help.rb', line 21

def self.banner; "candle help"; end

.source_rootObject

Define the source root



20
# File 'lib/candle/generators/help.rb', line 20

def self.source_root; File.expand_path(File.dirname(__FILE__)); end

Instance Method Details

#create_helpObject



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/candle/generators/help.rb', line 30

def create_help
  @developer = "eiffel"
  @created_on = Date.today.to_s
  puts colorize( "Candle Version: #{Candle::Version::STRING}", { :foreground => :red, :background => :white, :config => :underline } )
  puts
  puts "Candle is a wax iOS code generators tool."
  puts                    
  puts colorize("Generator Options")
  opt = [{ :category => "generators", :command => "candle blank demo", :description => "generate a blank wax iOS project"},
    { :category => "generators", :command => "candle xib demo", :description => "generate a wax iOS project using xib and core animation"},
    { :category => "generators", :command => "candle table demo", :description => "generate a wax blank iOS project using tableview"},
    { :category => "generators", :command => "candle map demo", :description => "generate a wax iOS application using MapKit framework"}
    
         ] 
  View.render(opt, RENDER_OPTIONS)
  puts        
end